### Question:
AddressResolver { AdvertisedSocketAddress resolveCorrectCCAddress( Config config, OptionalHostnamePort userProvidedAddress ) { AdvertisedSocketAddress defaultValue = readDefaultConfigAddressCC( config ); return new AdvertisedSocketAddress( userProvidedAddress.getHostname().orElse( defaultValue.getHostname() ), userProvidedAddress.getPort().orElse( defaultValue.getPort() ) ); }    }### Answer:
@Test public void noPortResolvesToDefault_cc() { Config config = Config.builder() .withSetting( OnlineBackupSettings.online_backup_server, "any:1234" ) .build(); AdvertisedSocketAddress resolved = subject.resolveCorrectCCAddress( config, new OptionalHostnamePort( "localhost", null, null ) ); assertEquals( 1234, resolved.getPort() ); }