Assert.assertEquals(preProcessingActions.get(0), action2);
}
@Test
public void testAddRemovePostProcessingActions() throws Exception {
ConnectorService processorService = new MockConnectorService("test", new MockProcessor(), resourceRegistry);
Action action1 = new MockAction();
Action action2 = new MockAction();
// add first action
processorService.addPostProcessingAction(action1);
Assert.assertEquals(1, processorService.getPostProcessingActions().size());
// add second action
processorService.addPostProcessingAction(action2);
Assert.assertEquals(2, processorService.getPostProcessingActions().size());
List<Action> postProcessingActions = processorService.getPostProcessingActions();
Assert.assertEquals(postProcessingActions.get(0), action1);
Assert.assertEquals(postProcessingActions.get(1), action2);
// remove action 1
processorService.removePostProcessingAction(action1);
Assert.assertEquals(1, processorService.getPostProcessingActions().size());
postProcessingActions = processorService.getPostProcessingActions();
Assert.assertEquals(postProcessingActions.get(0), action2);
}