### Question:
EqualMatcher extends AbstractMatcher { @Override public boolean isSatisfiedBy(String currentValue) { return CalculateService.equal(getPattern(), getValue(), currentValue); } EqualMatcher(String value);  EqualMatcher(Pattern value); @Override MatcherType getMatcherType(); @Override boolean isSatisfiedBy(String currentValue);  }### Answer:
@Test public void shouldEqualToString() { EndsWithMatcher matcher = new EndsWithMatcher("some value"); assertThat(matcher.isSatisfiedBy("some value")).isTrue(); }
@Test public void shouldNotEqualToString() { EndsWithMatcher matcher = new EndsWithMatcher("some value"); assertThat(matcher.isSatisfiedBy("non-matching")).isFalse(); }
@Test public void shouldEqualToPattern() { EndsWithMatcher matcher = new EndsWithMatcher(Pattern.compile("^.*me valu.*")); assertThat(matcher.isSatisfiedBy("some value")).isTrue(); }
@Test public void shouldNotEqualToPattern() { EndsWithMatcher matcher = new EndsWithMatcher(Pattern.compile("value.*")); assertThat(matcher.isSatisfiedBy("non-matching")).isFalse(); }