### Question:
Conditions { public static Condition onPropertyMatches(final String property, final String pattern) { var match = Pattern.compile(pattern).asMatchPredicate(); return OnPropertyCondition.ofTypeString(property, opt -> opt.map(match::test).orElse(false)); }  static Condition compose(final List<? extends Condition> conditions); static Condition compose(final Condition ...conditions); static Condition any(final List<? extends Condition> conditions); static Condition any(final Condition ...conditions); static Condition onPropertyExist(final String property); static Condition onPropertyMissing(final String property); static Condition onPropertyEquals(final String property, final String value); static Condition onPropertyNotEquals(final String property, final String value); static Condition onPropertyMatches(final String property, final String pattern); static Condition onPropertyTrue(final String property); static Condition onComponents(final List<Class> types); static Condition onMissingComponent(final List<Class> types); static List<Condition> buildConditionsForAnnotations(final List<ConditionalOn> annotations);  }### Answer:
@Test public void shouldReturnFalseWhenConditionOnPropertyMatchesGivenMatchingContext() { Assertions.assertFalse(Conditions .onPropertyMatches("props", "^val.*") .matches(contextWith(Conf.of("props", "foo"))) ); }
@Test public void shouldReturnTrueWhenConditionOnPropertyMatchesGivenMatchingContext() { Assertions.assertTrue(Conditions .onPropertyMatches("props", "^val.*") .matches(contextWith(Conf.of("props", "value"))) ); }