@Test
public void testSetPeerAddress() {

    DefaultConfigParamsImpl configParams = new DefaultConfigParamsImpl();
    RaftActorContextImpl context = new RaftActorContextImpl(actor, actor.underlyingActor().getContext(),
            "test", new ElectionTermImpl(createProvider(), "test", LOG), -1, -1,
            new HashMap<>(ImmutableMap.of("peer1", "peerAddress1")), configParams,
            createProvider(), applyState -> { }, LOG,  MoreExecutors.directExecutor());
    context.setPeerAddress("peer1", "peerAddress1_1");
    assertEquals("getPeerAddress", "peerAddress1_1", context.getPeerAddress("peer1"));
    context.setPeerAddress("peer2", "peerAddress2");
    assertEquals("getPeerAddress", null, context.getPeerAddress("peer2"));
}