@Test
public void testExecute__Cluster_instance_noSpecifiedProps() throws Exception {

  ResourceDefinition resourceDefinition = createNiceMock(ResourceDefinition.class);
  Map<Resource.Type, String> mapIds = new HashMap<Resource.Type, String>();
  mapIds.put(Resource.Type.Cluster, "cluster");
  // expectations
  expect(resourceDefinition.getType()).andReturn(Resource.Type.Cluster).anyTimes();
  Set<SubResourceDefinition> setChildren = new HashSet<SubResourceDefinition>();
  setChildren.add(new SubResourceDefinition(Resource.Type.Host));
  expect(resourceDefinition.getSubResourceDefinitions()).andReturn(setChildren).anyTimes();
  replay(resourceDefinition);
  //test
  QueryImpl instance = new TestQuery(mapIds, resourceDefinition);
  Result result = instance.execute();
  verify(resourceDefinition);
  TreeNode<Resource> tree = result.getResultTree();
  Assert.assertEquals(1, tree.getChildren().size());
  TreeNode<Resource> clusterNode = tree.getChild("Cluster:1");
  Assert.assertEquals("Cluster:1", clusterNode.getName());
  Assert.assertEquals(Resource.Type.Cluster, clusterNode.getObject().getType());
  Assert.assertEquals(1, clusterNode.getChildren().size());
  TreeNode<Resource> hostNode = clusterNode.getChild("hosts");
  Assert.assertEquals(4, hostNode.getChildren().size());
}