ShardPeerAddressResolver implements PeerAddressResolver { @Override public void setResolved(final String peerId, final String address) { memberNameToAddress.put(ShardIdentifier.fromShardIdString(peerId).getMemberName(), AddressFromURIString.parse(address)); } ShardPeerAddressResolver(final String shardManagerType, final MemberName localMemberName); @Override String resolve(final String peerId); @Override void setResolved(final String peerId, final String address);  }
@Test public void testSetResolved() { String type = "config"; ShardPeerAddressResolver resolver = new ShardPeerAddressResolver(type, MEMBER_1); String peerId = ShardIdentifier.create("default", MEMBER_2, type).toString(); String address = "akka.tcp: + "/" + MEMBER_2.getName() + "-shard-default-" + type; resolver.setResolved(peerId, address); assertEquals("resolve", address, resolver.resolve(peerId)); }