### Question:
BooleanMatcher extends ElementMatcher.Junction.AbstractBase<T> { public boolean matches(T target) { return matches; } BooleanMatcher(boolean matches); boolean matches(T target); @Override String toString();  }### Answer:
@Test public void testMatch() throws Exception { Object target = mock(Object.class); assertThat(new BooleanMatcher<Object>(true).matches(target), is(true)); verifyZeroInteractions(target); }
@Test public void testNoMatch() throws Exception { Object target = mock(Object.class); assertThat(new BooleanMatcher<Object>(false).matches(target), is(false)); verifyZeroInteractions(target); }