### Question:
ObjectClass extends CommonSchemaElements { public Set<ObjectClass> getSuperiorClasses() { return superiorClasses; } ObjectClass(String definition, String primaryName,
                     Collection<String> names, String oid,
                     String description,
                     Set<ObjectClass> superiorClasses,
                     Set<AttributeType> requiredAttributes,
                     Set<AttributeType> optionalAttributes,
                     ObjectClassType objectClassType,
                     boolean isObsolete,
                     Map<String, List<String>> extraProperties); Set<ObjectClass> getSuperiorClasses(); boolean isDescendantOf(ObjectClass objectClass); Set<AttributeType> getRequiredAttributes(); Set<AttributeType> getRequiredAttributeChain(); boolean isRequired(AttributeType attributeType); Set<AttributeType> getOptionalAttributes(); Set<AttributeType> getOptionalAttributeChain(); boolean isOptional(AttributeType attributeType); boolean isRequiredOrOptional(AttributeType attributeType); ObjectClassType getObjectClassType(); boolean isExtensibleObject(); @Override String toString(); ObjectClass setDirty(); boolean isDirty();  }### Answer:
@Test public void testGetSuperiorClassNoSuperior() throws Exception { ObjectClassBuilder builder = new ObjectClassBuilder("testType", "1.2.3"); ObjectClass c = builder.getInstance(); Assert.assertTrue(c.getSuperiorClasses().isEmpty()); }
@Test public void testGetSuperiorClassWithSuperior() throws Exception { ObjectClassBuilder builder = new ObjectClassBuilder("parent", "1.2.3"); ObjectClass parent = builder.getInstance(); builder = new ObjectClassBuilder("child", "1.2.3"); builder.setSuperior(Collections.singleton(parent)); ObjectClass child = builder.getInstance(); Assert.assertTrue(child.getSuperiorClasses().contains(parent)); }
@Test public void testGetSuperiorClassWithSuperiors() throws Exception { ObjectClassBuilder builder = new ObjectClassBuilder("parent1", "1.2.3"); ObjectClass parent1 = builder.getInstance(); builder = new ObjectClassBuilder("parent2", "2.3.4"); ObjectClass parent2 = builder.getInstance(); Set<ObjectClass> superiors = new LinkedHashSet<>(); superiors.add(parent1); superiors.add(parent2); builder = new ObjectClassBuilder("child", "1.2.3.4"); builder.setSuperior(superiors); ObjectClass child = builder.getInstance(); Assert.assertTrue(child.getSuperiorClasses().contains(parent1)); Assert.assertTrue(child.getSuperiorClasses().contains(parent2)); }
@Test(dataProvider = "superiorData") public void testMultipleSuperiors(ObjectClass parent1, ObjectClass parent2, ObjectClassType type, boolean isValid) throws Exception { ObjectClassBuilder builder = new ObjectClassBuilder("testType", "1.2.3"); builder.setObjectClassType(type); Set<ObjectClass> superiors = new LinkedHashSet<>(); superiors.add(parent1); superiors.add(parent2); builder.setSuperior(superiors); ObjectClass child = builder.getInstance(); Assert.assertEquals(child.getSuperiorClasses().size(), 2); }