@Test
public void nodeRestartWithSameAddressDifferentId() throws Throwable {

    int failedNodeCount = 1;
    int afterFailureQuorum = this.nodeCount - failedNodeCount;
    setUp(this.nodeCount);
    setOperationTimeoutMicros(TimeUnit.SECONDS.toMicros(5));
    this.host.joinNodesAndVerifyConvergence(this.nodeCount);
    this.host.log("Stopping node");
    // relax quorum for convergence check
    this.host.setNodeGroupQuorum(afterFailureQuorum);
    // we should now have N nodes, that see each other. Stop one of the
    // nodes, and verify the other host's node group deletes the entry
    List<ServiceHostState> hostStates = stopHostsToSimulateFailure(failedNodeCount);
    URI remainingPeerNodeGroup = this.host.getPeerNodeGroupUri();
    // wait for convergence of the remaining peers, before restarting. The failed host
    // should be marked FAILED, otherwise we will not converge
    this.host.waitForNodeGroupConvergence(this.nodeCount - failedNodeCount);
    ServiceHostState stoppedHostState = hostStates.get(0);
    // start a new HOST, with a new ID, but with the same address:port as the one we stopped
    this.host.testStart(1);
    VerificationHost newHost = this.host.setUpLocalPeerHost(stoppedHostState.httpPort,
            VerificationHost.FAST_MAINT_INTERVAL_MILLIS, null);
    this.host.testWait();
    // re-join the remaining peers
    URI newHostNodeGroupService = UriUtils
            .buildUri(newHost.getUri(), ServiceUriPaths.DEFAULT_NODE_GROUP);
    this.host.testStart(1);
    this.host.joinNodeGroup(newHostNodeGroupService, remainingPeerNodeGroup);
    this.host.testWait();
    // now wait for convergence. If the logic is correct, the old HOST, that listened on the
    // same port as the new host, should stay in the FAILED state, but the new host should
    // be marked as HEALTHY
    this.host.waitForNodeGroupConvergence(this.nodeCount);
}