@Test
public void testFinalizeResult_kerberos() throws Exception{

  setupMocksForKerberosEnabledCluster();
  Result result = new ResultImpl(true);
  createClusterResultTree(result.getResultTree());
  ClusterBlueprintRenderer renderer = new TestBlueprintRenderer(topology);
  Result blueprintResult = renderer.finalizeResult(result);
  TreeNode<Resource> blueprintTree = blueprintResult.getResultTree();
  assertNull(blueprintTree.getStringProperty("isCollection"));
  assertEquals(1, blueprintTree.getChildren().size());
  TreeNode<Resource> blueprintNode = blueprintTree.getChildren().iterator().next();
  assertEquals(0, blueprintNode.getChildren().size());
  Resource blueprintResource = blueprintNode.getObject();
  Map<String, Map<String, Object>> properties = blueprintResource.getPropertiesMap();
  assertEquals("HDP", properties.get("Blueprints").get("stack_name"));
  assertEquals("1.3.3", properties.get("Blueprints").get("stack_version"));
  Map<String, Object> securityProperties = (Map<String, Object>) properties.get("Blueprints").get("security");
  assertEquals("KERBEROS", securityProperties.get("type"));
  assertNotNull(((Map<String, Object>) securityProperties.get("kerberos_descriptor")).get("properties"));
}