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