@Test
public void testFinalizeProperties__instance() {

  QueryInfo rootQuery = new QueryInfo(new ClusterResourceDefinition(), new HashSet<String>());
  TreeNode<QueryInfo> queryTree = new TreeNodeImpl<QueryInfo>(null, rootQuery, "Cluster");
  rootQuery.getProperties().add("foo/bar");
  rootQuery.getProperties().add("prop1");
  QueryInfo hostInfo = new QueryInfo(new HostResourceDefinition(), new HashSet<String>());
  queryTree.addChild(hostInfo, "Host");
  QueryInfo hostComponentInfo = new QueryInfo(new HostComponentResourceDefinition(), new HashSet<String>());
  queryTree.getChild("Host").addChild(hostComponentInfo, "HostComponent");
  ClusterBlueprintRenderer renderer = new ClusterBlueprintRenderer();
  TreeNode<Set<String>> propertyTree = renderer.finalizeProperties(queryTree, false);
  Set<String> rootProperties = propertyTree.getObject();
  assertEquals(2, rootProperties.size());
  assertNotNull(propertyTree.getChild("Host"));
  assertTrue(propertyTree.getChild("Host").getObject().isEmpty());
  assertNotNull(propertyTree.getChild("Host/HostComponent"));
  assertEquals(1, propertyTree.getChild("Host/HostComponent").getObject().size());
  assertTrue(propertyTree.getChild("Host/HostComponent").getObject().contains("HostRoles/component_name"));
}