DelegateConfirmationCallback implements ConfirmationCallback { @Nullable protected ExternalSystemConfirmation getImplementation(ExternalSystemExtEnum externalSystem) { if (msgConfirmations == null) { return null; } for (ExternalSystemConfirmation msgConfirmation : msgConfirmations) { final Set<ExternalSystemExtEnum> systems = msgConfirmation.getExternalSystems(); List<String> supportedSystems = new LinkedList<String>(); for (ExternalSystemExtEnum system : systems) { supportedSystems.add(system.getSystemName()); } if (supportedSystems.contains(externalSystem.getSystemName())) { return msgConfirmation; } } return null; }  @Override void confirm(Message msg);  }
@Test public void testGetImplementation() throws Exception { assertThat(confirmation.getImplementation(getSourceSystem("CRM")), notNullValue()); }