IntegrationContextServiceImpl implements IntegrationContextService { @Override public void deleteIntegrationContext(IntegrationContextEntity integrationContextEntity) { commandExecutor.execute(new DeleteIntegrationContextCmd(integrationContextEntity)); } IntegrationContextServiceImpl(CommandExecutor commandExecutor); @Override IntegrationContextEntity findById(String id); @Override void deleteIntegrationContext(IntegrationContextEntity integrationContextEntity);  }
@Test public void deleteIntegrationContextShouldExecuteDeleteIntegrationContextCommand() { IntegrationContextEntity entity = mock(IntegrationContextEntity.class); integrationContextService.deleteIntegrationContext(entity); verify(commandExecutor).execute(any(DeleteIntegrationContextCmd.class)); }