String testName = className + "_" + methodName;
System.out.println("START " + testName + " at " + new Date(System.currentTimeMillis()));
ClusterAccessor clusterAccessor = new ClusterAccessor(_clusterId, _dataAccessor);
Cluster cluster = clusterAccessor.readCluster();
ClusterId id = cluster.getId();
Assert.assertEquals(id, _clusterId);
Map<ParticipantId, Participant> liveParticipantMap = cluster.getLiveParticipantMap();
Assert.assertEquals(liveParticipantMap.size(), n);
for (ParticipantId participantId : liveParticipantMap.keySet()) {
Participant participant = liveParticipantMap.get(participantId);
Map<ResourceId, CurrentState> curStateMap = participant.getCurrentStateMap();
Assert.assertEquals(curStateMap.size(), 1);
ResourceId resourceId = ResourceId.from("TestDB0");
Assert.assertTrue(curStateMap.containsKey(resourceId));
CurrentState curState = curStateMap.get(resourceId);
Map<PartitionId, State> partitionStateMap = curState.getTypedPartitionStateMap();
Assert.assertEquals(partitionStateMap.size(), p);
}
Map<ResourceId, Resource> resourceMap = cluster.getResourceMap();
Assert.assertEquals(resourceMap.size(), 1);
ResourceId resourceId = ResourceId.from("TestDB0");
Assert.assertTrue(resourceMap.containsKey(resourceId));
Resource resource = resourceMap.get(resourceId);