assert !AChildren.isEmpty() : "Expected Children for Node A";
int AChildResourceTypeId = AChildren.get(0).getResourceType().getId();
String AChildResourceKey = AChildren.get(0).getResourceKey();
ClusterKey clusterKey = new ClusterKey(clusterGroup.getId(), AChildResourceTypeId, AChildResourceKey);
assert clusterKey.getClusterGroupId() == clusterGroup.getId();
assert clusterKey.getDepth() == 1;
assert AChildResourceKey.equals(clusterKey.getHierarchy().get(0).getResourceKey());
assert AChildResourceTypeId == clusterKey.getHierarchy().get(0).getResourceTypeId();
assert AChildResourceTypeId == ClusterKey.getResourceType(clusterKey);
assert ClusterKey.valueOf(clusterKey.toString()) != null;
List<Resource> resources = clusterManager.getAutoClusterResources(subject, clusterKey);
assert resources.size() == 2;
assert resources.get(0).getId() != resources.get(1).getId();
assert resources.get(0).getParentResource().getId() != resources.get(1).getParentResource().getId();
assert resources.get(0).getParentResource().getId() == nodeA.getId()
|| resources.get(0).getParentResource().getId() == nodeB.getId();
assert resources.get(1).getParentResource().getId() == nodeA.getId()
|| resources.get(1).getParentResource().getId() == nodeB.getId();
assertNull(clusterManager.getAutoClusterBackingGroup(subject, clusterKey));
ResourceGroup backingGroup = clusterManager.createAutoClusterBackingGroup(subject, clusterKey, true);
assertNotNull(backingGroup);
assertEquals(backingGroup.getClusterKey(), clusterKey.toString());
assertEquals(backingGroup.getClusterResourceGroup(), clusterGroup);
//Set<Resource> backingGroupResources = backingGroup.getExplicitResources();
// explicitResources for backingGroup is lazy, so we need to hit resourceManager for the answer
List<Resource> backingGroupResources = resourceManager.findExplicitResourcesByResourceGroup(subject,
backingGroup, PageControl.getUnlimitedInstance());