/** * Creates a matcher that returns true if the value af the named property matches the given matcher * @param propertyName The name of the property * @param value The value to be mathced * @return A matcher that returns true if the value af the named property matches the given matcher */ @Factory public static <T> Matcher<T> hasNestedProperty(String propertyName, Matcher<?> value) { return new HasNestedPropertyWithValue<T>(propertyName, value); } }