IsOpenPredicate implements Predicate<Session> { @Override public boolean test(Session t) { return t.isOpen(); }  @Override boolean test(Session t);  }
@Test public void testTest() { System.out.println("test"); Session t = mock(Session.class); when(t.isOpen()).thenReturn(Boolean.FALSE, Boolean.TRUE); boolean result = instance.test(t); assertThat(result).isFalse(); result = instance.test(t); assertThat(result).isTrue(); }