### Question:
PropertyList implements Serializable { public void setPropertyValue(T object, String propertyName, Object propertyValue) throws IllegalArgumentException, IllegalStateException { assert propertyName != null : "propertyName must not be null"; assert object != null : "object must not be null"; if (!getAllAvailablePropertyNames().contains(propertyName)) { throw new IllegalArgumentException("Illegal property name: " + propertyName); } metadata.setPropertyValue(object, propertyName, propertyValue); } PropertyList(ClassMetadata<T> metadata);  PropertyList(PropertyList<T> parentList); ClassMetadata<T> getClassMetadata(); PropertyList<T> getParentList(); void setSortProperty(String propertyName, String sortPropertyName); void addNestedProperty(String propertyName); boolean removeProperty(String propertyName); Set<String> getAllAvailablePropertyNames(); Set<String> getPropertyNames(); Set<String> getPersistentPropertyNames(); Map<String, String> getSortablePropertyMap(); Set<String> getNestedPropertyNames(); Class<?> getPropertyType(String propertyName); boolean isPropertyWritable(String propertyName); Object getPropertyValue(T object, String propertyName); void setPropertyValue(T object, String propertyName,
            Object propertyValue); PropertyKind getPropertyKind(String propertyName); boolean isPropertyLazyLoaded(String propertyName);  }### Answer:
@Test public void testSetPropertyValue_TransientProperty() { Person p = new Person(); propertyList.setPropertyValue(p, "tempData", "Hello World"); assertEquals("Hello World", p.getTempData()); childPropertyList.setPropertyValue(p, "tempData", "World Hello"); assertEquals("World Hello", p.getTempData()); }
@Test public void testSetPropertyValue_PersistentProperty() { Person p = new Person(); propertyList.setPropertyValue(p, "firstName", "Joe"); assertEquals("Joe", p.getFirstName()); childPropertyList.setPropertyValue(p, "firstName", "Max"); assertEquals("Max", p.getFirstName()); }
@Test public void testSetPropertyValue_Invalid() { Person p = new Person(); try { propertyList.setPropertyValue(p, "nonexistent", "Hello"); fail("No exception thrown"); } catch (IllegalArgumentException e) { } try { propertyList.setPropertyValue(p, "address.street", "Hello"); fail("No exception thrown"); } catch (IllegalArgumentException e) { } }