permittedNodes.add("localhost:" + TEST_NODE_PORT);
permittedNodes.add("localhost:" + _portHelper.getNextAvailable());
firstNode.setPermittedNodes(permittedNodes);
ReplicatedEnvironmentFacade.ReplicationNodeImpl replicationNode = new ReplicatedEnvironmentFacade.ReplicationNodeImpl(TEST_NODE_NAME, TEST_NODE_HOST_PORT);
NodeState nodeState = ReplicatedEnvironmentFacade.getRemoteNodeState(TEST_GROUP_NAME, replicationNode, 5000);
ObjectMapper objectMapper = new ObjectMapper();
Map<String, Object> settings = objectMapper.readValue(nodeState.getAppState(), Map.class);
Collection<String> appStatePermittedNodes = (Collection<String>)settings.get(ReplicatedEnvironmentFacade.PERMITTED_NODE_LIST);
assertEquals("Unexpected permitted nodes", permittedNodes, new HashSet<String>(appStatePermittedNodes));
}