### Question:
LDAPProfile { public List<String> getObjectClasses(AbstractManagedObjectDefinition<?, ?> d) { LinkedList<String> objectClasses = new LinkedList<>(); Set<String> s = new HashSet<>(); while (d != null) { String oc = getObjectClass(d); if (s.add(oc)) { objectClasses.addFirst(oc); } d = d.getParent(); } if (!s.contains("top")) { objectClasses.addFirst("top"); } return objectClasses; } private  LDAPProfile(); static LDAPProfile getInstance(); String getAttributeName(AbstractManagedObjectDefinition<?, ?> d, PropertyDefinition<?> pd); String getRelationChildRDNType(InstantiableRelationDefinition<?, ?> r); List<String> getRelationObjectClasses(RelationDefinition<?, ?> r); String getRelationChildRDNType(SetRelationDefinition<?, ?> r); String getObjectClass(AbstractManagedObjectDefinition<?, ?> d); List<String> getObjectClasses(AbstractManagedObjectDefinition<?, ?> d); String getRelationRDNSequence(RelationDefinition<?, ?> r); void popWrapper(); void pushWrapper(Wrapper wrapper);  }### Answer:
@Test public void testGetObjectClasses() { LDAPProfile ldapProfile = LDAPProfile.getInstance(); List<String> objectClasses = ldapProfile.getObjectClasses(GlobalCfgDefn.getInstance()); assertTrue(objectClasses.contains("top")); }