src/main/java/org/fest/assertions/CollectionAssert.java
@Override
  public @NotNull CollectionAssert onProperty(@NotNull String propertyName) {
    isNotNull();
    checkNotNull(propertyName);
    if (actual.isEmpty()) {
      return new CollectionAssert(emptyList());
    }
    return new CollectionAssert(PropertySupport.instance().propertyValues(propertyName, actual));
  }
@Override
  public @NotNull CollectionAssert onProperty(@NotNull String propertyName) {
    isNotNull();
    checkNotNull(propertyName);
    if (actual.isEmpty()) {
      return new CollectionAssert(emptyList());
    }
    return new CollectionAssert(PropertySupport.instance().propertyValues(propertyName, actual));
  }
Creates a new instance of {@link CollectionAssert} whose target collection contains the values of the given
property name from the elements of this {@code CollectionAssert}'s collection. Property access works with both
simple properties like {@code Person.age} and nested properties {@code Person.father.age}.
<p/>
For example, let's say we have a collection of {@code Person} objects and you want to verify their age:
<pre>
assertThat(persons).onProperty(&quot;age&quot;).containsOnly(25, 16, 44, 37); // simple property
assertThat(persons).onProperty("father.age").containsOnly(55, 46, 74, 62); // nested property
</pre>

@param propertyName the name of the property to extract values from the actual collection to build a new
{@code CollectionAssert}.
@return a new {@code CollectionAssert} containing the values of the given property name from the elements of this
{@code CollectionAssert}'s collection.
@throws AssertionError       if the actual collection is {@code null}.
@throws NullPointerException if the given property name is {@code null}.
@throws IntrospectionError   if an element in the given collection does not have a matching property.
@since 1.3