@Test
public void testFinalizeProperties__instance_noProperties() {

  SchemaFactory schemaFactory = createNiceMock(SchemaFactory.class);
  Schema schema = createNiceMock(Schema.class);
  // schema expectations
  expect(schemaFactory.getSchema(Resource.Type.Component)).andReturn(schema).anyTimes();
  expect(schemaFactory.getSchema(Resource.Type.Alert)).andReturn(schema).anyTimes();
  expect(schemaFactory.getSchema(Resource.Type.Artifact)).andReturn(schema).anyTimes();
  expect(schema.getKeyPropertyId(Resource.Type.Component)).andReturn("ServiceComponentInfo/component_name").anyTimes();
  expect(schema.getKeyPropertyId(Resource.Type.Service)).andReturn("ServiceComponentInfo/service_name").anyTimes();
  replay(schemaFactory, schema);
  QueryInfo rootQuery = new QueryInfo(new ServiceResourceDefinition(), new HashSet<String>());
  TreeNode<QueryInfo> queryTree = new TreeNodeImpl<QueryInfo>(null, rootQuery, "Service");
  DefaultRenderer renderer = new DefaultRenderer();
  renderer.init(schemaFactory);
  TreeNode<Set<String>> propertyTree = renderer.finalizeProperties(queryTree, false);
  // no properties should have been added
  assertTrue(propertyTree.getObject().isEmpty());
  assertEquals(3, propertyTree.getChildren().size());
  TreeNode<Set<String>> componentNode = propertyTree.getChild("Component");
  assertEquals(2, componentNode.getObject().size());
  assertTrue(componentNode.getObject().contains("ServiceComponentInfo/component_name"));
  assertTrue(componentNode.getObject().contains("ServiceComponentInfo/service_name"));
  verify(schemaFactory, schema);
}