### Question:
StringMatcher extends ElementMatcher.Junction.AbstractBase<String> { public boolean matches(String target) { return mode.matches(value, target); } StringMatcher(String value, Mode mode); boolean matches(String target); @Override String toString();  }### Answer:
@Test public void testMatch() throws Exception { assertThat(new StringMatcher(matching, mode).matches(FOO), is(true)); }
@Test public void testNoMatch() throws Exception { assertThat(new StringMatcher(nonMatching, mode).matches(FOO), is(false)); }