+ @Test
+ public void testPeerAddressResolved(){
+ new JavaTestKit(getSystem()) {{
+ Map<String, String> peerAddresses = new HashMap<>();
+ peerAddresses.put("member-2", null);
+ final Props props = Shard.props("config", peerAddresses);
+ final ActorRef subject =
+ getSystem().actorOf(props, "testPeerAddressResolved");
+
+ new Within(duration("1 seconds")) {
+ protected void run() {
+
+ subject.tell(
+ new PeerAddressResolved("member-2", "akka://foobar"),
+ getRef());
+
+ expectNoMsg();
+ }