### Question:
PropertySetter extends ContextAwareBase { public Class<?> getClassNameViaImplicitRules(String name, AggregationType aggregationType, DefaultNestedComponentRegistry registry) { Class<?> registryResult = registry.findDefaultComponentType(obj.getClass(), name); if (registryResult != null) { return registryResult; } Method relevantMethod = getRelevantMethod(name, aggregationType); if (relevantMethod == null) { return null; } Class<?> byAnnotation = getDefaultClassNameByAnnonation(name, relevantMethod); if (byAnnotation != null) { return byAnnotation; } return getByConcreteType(name, relevantMethod); } PropertySetter(Object obj); void setProperty(String name, String value); void setProperty(PropertyDescriptor prop, String name, String value); AggregationType computeAggregationType(String name); Class<?> getObjClass(); void addComplexProperty(String name, Object complexProperty); void addBasicProperty(String name, String strValue); void setComplexProperty(String name, Object complexProperty); Object getObj(); Class<?> getClassNameViaImplicitRules(String name,
      AggregationType aggregationType, DefaultNestedComponentRegistry registry);  }### Answer:
@Test public void testgetClassNameViaImplicitRules() { Class<?> compClass = setter.getClassNameViaImplicitRules("door", AggregationType.AS_COMPLEX_PROPERTY, defaultComponentRegistry); assertEquals(Door.class, compClass); }
@Test public void testgetComplexPropertyColleClassNameViaImplicitRules() { Class<?> compClass = setter.getClassNameViaImplicitRules("window", AggregationType.AS_COMPLEX_PROPERTY_COLLECTION, defaultComponentRegistry); assertEquals(Window.class, compClass); }