KerberosDescriptor extends AbstractKerberosDescriptorContainer { public KerberosServiceDescriptor getService(String name) { return ((name == null) || (services == null)) ? null : services.get(name); } KerberosDescriptor();   KerberosDescriptor(Map<?, ?> data); @Override Collection<? extends AbstractKerberosDescriptorContainer> getChildContainers(); @Override AbstractKerberosDescriptorContainer getChildContainer(String name); void setServices(Map<String, KerberosServiceDescriptor> services); Map<String, KerberosServiceDescriptor> getServices(); KerberosServiceDescriptor getService(String name); void putService(KerberosServiceDescriptor service); void setProperties(Map<String, String> properties); Map<String, String> getProperties(); String getProperty(String name); void putProperty(String name, String value); void update(KerberosDescriptor updates); @Override Map<String, Object> toMap(); @Override void setParent(AbstractKerberosDescriptor parent); @Override int hashCode(); @Override boolean equals(Object object); Set<String> getAllAuthToLocalProperties();  }
@Test public void testGetReferencedIdentityDescriptor_RelativePath() throws IOException { URL systemResourceURL = ClassLoader.getSystemResource("kerberos/test_get_referenced_identity_descriptor.json"); Assert.assertNotNull(systemResourceURL); KerberosDescriptor descriptor = KERBEROS_DESCRIPTOR_FACTORY.createInstance(new File(systemResourceURL.getFile())); Assert.assertNotNull(descriptor); KerberosServiceDescriptor serviceDescriptor = descriptor.getService("SERVICE2"); Assert.assertNotNull(serviceDescriptor); KerberosComponentDescriptor componentDescriptor = serviceDescriptor.getComponent("SERVICE2_COMPONENT1"); Assert.assertNotNull(componentDescriptor); KerberosIdentityDescriptor identity; identity = componentDescriptor.getReferencedIdentityDescriptor("../service2_identity"); Assert.assertNotNull(identity); Assert.assertEquals("service2_identity", identity.getName()); Assert.assertEquals(serviceDescriptor, identity.getParent()); identity = serviceDescriptor.getReferencedIdentityDescriptor("../service2_identity"); Assert.assertNull(identity); }