IdentityResolver implements ServerAddressResolver { @Override public Set<ServerAddress> resolve( ServerAddress initialRouter ) { return singleton( initialRouter ); } private  IdentityResolver(); @Override Set<ServerAddress> resolve( ServerAddress initialRouter ); static final IdentityResolver IDENTITY_RESOLVER; }
@Test void shouldReturnGivenAddress() { ServerAddress address = mock( ServerAddress.class ); Set<ServerAddress> resolved = IDENTITY_RESOLVER.resolve( address ); assertThat( resolved.size(), equalTo( 1 ) ); assertThat( resolved.iterator().next(), is( address ) ); }