### Question:
ModifierMatcher extends ElementMatcher.Junction.AbstractBase<T> { public boolean matches(T target) { return (mode.getModifiers() & target.getModifiers()) != 0; } ModifierMatcher(Mode mode); boolean matches(T target); @Override String toString();  }### Answer:
@Test public void testMatch() throws Exception { when(modifierReviewable.getModifiers()).thenReturn(modifiers); assertThat(new ModifierMatcher<ModifierReviewable>(mode).matches(modifierReviewable), is(true)); verify(modifierReviewable).getModifiers(); verifyNoMoreInteractions(modifierReviewable); }
@Test public void testNoMatch() throws Exception { when(modifierReviewable.getModifiers()).thenReturn(0); assertThat(new ModifierMatcher<ModifierReviewable>(mode).matches(modifierReviewable), is(false)); verify(modifierReviewable).getModifiers(); verifyNoMoreInteractions(modifierReviewable); }