### Question:
TransportConfiguration { @ConditionalOnMissingBean(TransportConfigCallback.class) @Bean public TransportConfigCallback propertiesBasedSshTransportCallback(final SshUriProperties sshUriProperties) { if(sshUriProperties.isIgnoreLocalSshSettings()) { return new PropertiesBasedSshTransportConfigCallback(sshUriProperties); } else return new FileBasedSshTransportConfigCallback(sshUriProperties); }  @ConditionalOnMissingBean(TransportConfigCallback.class) @Bean TransportConfigCallback propertiesBasedSshTransportCallback(final SshUriProperties sshUriProperties);  }### Answer:
@Test public void propertiesBasedSshTransportCallbackCreated() throws Exception { SshUriProperties ignoreLocalSettings = SshUri.builder() .uri("user@gitrepo.com:proj/repo") .ignoreLocalSshSettings(true) .build(); TransportConfiguration transportConfiguration = new TransportConfiguration(); TransportConfigCallback transportConfigCallback = transportConfiguration.propertiesBasedSshTransportCallback(ignoreLocalSettings); assertThat(transportConfigCallback, is(instanceOf(TransportConfiguration.PropertiesBasedSshTransportConfigCallback.class))); }
@Test public void fileBasedSshTransportCallbackCreated() throws Exception { SshUriProperties dontIgnoreLocalSettings = SshUri.builder() .uri("user@gitrepo.com:proj/repo") .ignoreLocalSshSettings(false) .build(); TransportConfiguration transportConfiguration = new TransportConfiguration(); TransportConfigCallback transportConfigCallback = transportConfiguration.propertiesBasedSshTransportCallback(dontIgnoreLocalSettings); assertThat(transportConfigCallback, is(instanceOf(TransportConfiguration.FileBasedSshTransportConfigCallback.class))); }