CurveSpecificationMatcher { public static CurveSpecificationMatcher nameLike(String pattern) { return new NameLike(pattern); }  abstract boolean matches(CurveSpecification curveSpec); static CurveSpecificationMatcher named(String name, String... names); static CurveSpecificationMatcher nameLike(String pattern);  }
@Test public void nameLike() { CurveSpecificationMatcher curveSpecMatcher = CurveSpecificationMatcher.nameLike("curveSpec?"); assertTrue(curveSpecMatcher.matches(CURVE_SPEC1)); assertTrue(curveSpecMatcher.matches(CURVE_SPEC2)); assertFalse(curveSpecMatcher.matches(OTHER_SPEC)); CurveSpecificationMatcher oneMatcher = CurveSpecificationMatcher.nameLike("*1"); assertTrue(oneMatcher.matches(CURVE_SPEC1)); assertFalse(oneMatcher.matches(CURVE_SPEC2)); assertFalse(oneMatcher.matches(OTHER_SPEC)); }