  @Test
  public void testpollWithPredicate() {

    long now1 = System.currentTimeMillis();
    boolean returnValue = PollUtils.poll((c) -> System.currentTimeMillis() >= now1 + c, 100, 600, 400);

    Assert.assertTrue(returnValue);
    long now2 = System.currentTimeMillis();
    Assert.assertTrue(now2 - now1 >= 350);
  }