@Test
public void findOwnerNode() throws Throwable {

    setUp(false);
    int nodeCount = 3;
    int pathVerificationCount = 3;
    this.host.setUpPeerHosts(nodeCount);
    this.host.joinNodesAndVerifyConvergence(nodeCount, true);
    this.host.setNodeGroupQuorum(nodeCount);
    // each host should say same owner for the path
    for (int i = 0; i < pathVerificationCount; i++) {
        String path = UUID.randomUUID().toString();
        Map<String, String> map = new HashMap<>();
        Set<String> ownerIds = new HashSet<>();
        for (VerificationHost h : this.host.getInProcessHostMap().values()) {
            String ownerId = h.findOwnerNode(null, path).ownerNodeId;
            map.put(h.getId(), ownerId);
            ownerIds.add(ownerId);
        }
        assertThat(ownerIds).as("all peers say same owner for %s. %s", path, map).hasSize(1);
    }
}