### Question:
PropertySetter extends ContextAwareBase { public void addComplexProperty(String name, Object complexProperty) { Method adderMethod = findAdderMethod(name); if (adderMethod != null) { Class<?>[] paramTypes = adderMethod.getParameterTypes(); if (!isSanityCheckSuccessful(name, adderMethod, paramTypes, complexProperty)) { return; } invokeMethodWithSingleParameterOnThisObject(adderMethod, complexProperty); } else { addError("Could not find method [" + "add" + name + "] in class [" + objClass.getName() + "]."); } } 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 testComplexCollection() { Window w1 = new Window(); w1.handle = 10; Window w2 = new Window(); w2.handle = 20; setter.addComplexProperty("window", w1); setter.addComplexProperty("window", w2); assertEquals(2, house.windowList.size()); assertEquals(10, house.windowList.get(0).handle); assertEquals(20, house.windowList.get(1).handle); }