use of org.codice.ddf.catalog.async.data.api.internal.ProcessDeleteItem in project ddf by codice.
the class MetacardBackupPluginTest method generateDeleteRequest.
private ProcessRequest<ProcessDeleteItem> generateDeleteRequest() {
List<ProcessDeleteItem> processDeleteItems = new ArrayList<>();
for (String id : METACARD_IDS) {
Metacard metacard = new MetacardImpl();
metacard.setAttribute(new AttributeImpl(Core.ID, id));
metacard.setAttribute(new AttributeImpl(Core.METADATA, XML_METADATA));
ProcessDeleteItem processDeleteItem = mock(ProcessDeleteItem.class);
when(processDeleteItem.getMetacard()).thenReturn(metacard);
processDeleteItems.add(processDeleteItem);
}
ProcessRequest<ProcessDeleteItem> processRequest = mock(ProcessRequest.class);
when(processRequest.getProcessItems()).thenReturn(processDeleteItems);
return processRequest;
}
Aggregations