ConcreteIntPredicate implements IntPredicate { public static ConcreteIntPredicate lte(int i) { return new LTEIntPredicate(i); } private  ConcreteIntPredicate(); @Override final ConcreteIntPredicate and(IntPredicate intPredicate); @Override final ConcreteIntPredicate negate(); @Override final ConcreteIntPredicate or(IntPredicate intPredicate); @Override @SuppressFBWarnings(value = "AOM_ABSTRACT_OVERRIDDEN_METHOD", justification = "We want subclasses to implement this") abstract int hashCode(); @Override @SuppressFBWarnings(value = "AOM_ABSTRACT_OVERRIDDEN_METHOD", justification = "We want subclasses to implement this") abstract boolean equals(Object o); @Override @SuppressFBWarnings(value = "AOM_ABSTRACT_OVERRIDDEN_METHOD", justification = "We want subclasses to implement this") abstract String toString(); static ConcreteIntPredicate gt(int i); static ConcreteIntPredicate gte(int i); static ConcreteIntPredicate lte(int i); static ConcreteIntPredicate lt(int i); static ConcreteIntPredicate eq(int i);  }
@Test public void testLte() { int v = 100; ConcreteIntPredicate lteP = lte(100); assertTrue(lteP.test(v)); assertFalse(lteP.test(v + 1)); assertTrue(lteP.test(v - 1)); assertEquals(lte(v), lteP); assertEquals(lte(v).hashCode(), lteP.hashCode()); assertNotEquals(lt(v), lteP); assertNotEquals(lte(v + 1), lteP); assertEquals(lteP.toString(), "<= 100"); }