StrictMatcher implements Matcher { @Override public <T extends ValueHolder> boolean matches(String value, String pattern, Type<T> type) { if(!EngineUtil.hasText(value)) { return Star.SYMBOL.equals(pattern); } return pattern.equals(value); }  @Override boolean matches(String value, String pattern, Type<T> type); static final String STRICT; }
@Test public void shouldReturnTrueWhenPatternAndValueStringsEqual() { StrictMatcher matcher = new StrictMatcher(); boolean matches = matcher.matches("A", "A", null); assertThat(matches).isTrue(); }
@Test public void shouldReturnFalseWhenPatternAndValueStringsDoNotEqual() { StrictMatcher matcher = new StrictMatcher(); boolean matches = matcher.matches("B", "A", null); assertThat(matches).isFalse(); }
@Test public void shouldReturnTrueWhenValueIsEmptyAndPatternIsAStar() { StrictMatcher matcher = new StrictMatcher(); boolean matches = matcher.matches("", "*", null); assertThat(matches).isTrue(); }