### Question:
EndsWithMatcher extends AbstractMatcher { @Override public boolean isSatisfiedBy(String currentValue) { return CalculateService.endsWith(getPattern(), getValue(), currentValue); } EndsWithMatcher(String value);  EndsWithMatcher(Pattern value); @Override MatcherType getMatcherType(); @Override boolean isSatisfiedBy(String currentValue);  }### Answer:
@Test public void shouldEndWithString() { EndsWithMatcher matcher = new EndsWithMatcher("me value"); assertThat(matcher.isSatisfiedBy("some value")).isTrue(); }
@Test public void shouldNotEndWithString() { EndsWithMatcher matcher = new EndsWithMatcher("some value"); assertThat(matcher.isSatisfiedBy("non-matching")).isFalse(); }
@Test public void shouldEndWithPattern() { EndsWithMatcher matcher = new EndsWithMatcher(Pattern.compile("me value.*")); assertThat(matcher.isSatisfiedBy("some value")).isTrue(); }
@Test public void shouldNotEndWithPattern() { EndsWithMatcher matcher = new EndsWithMatcher(Pattern.compile("value.*")); assertThat(matcher.isSatisfiedBy("non-matching")).isFalse(); }