DeleteIntegrationContextCmd implements Command<IntegrationContextEntity> { @Override public IntegrationContextEntity execute(CommandContext commandContext) { commandContext.getProcessEngineConfiguration().getIntegrationContextManager().delete(integrationContext); return integrationContext; } DeleteIntegrationContextCmd(IntegrationContextEntity integrationContext); @Override IntegrationContextEntity execute(CommandContext commandContext);  }
@Test public void executeShouldDeleteIntegrationContext() throws Exception { IntegrationContextEntity integrationContextEntity = mock(IntegrationContextEntity.class); DeleteIntegrationContextCmd command = new DeleteIntegrationContextCmd(integrationContextEntity); command.execute(commandContext); verify(integrationContextManager).delete(integrationContextEntity); }