IsBetweenLowerBoundInclusive extends TypeSafeMatcher<T> { public static <T extends Comparable<T>> Matcher<T> betweenLowerBoundInclusive(final T from, final T to) { return new IsBetweenLowerBoundInclusive(from, to); } IsBetweenLowerBoundInclusive(final T from, final T to); static Matcher<T> betweenLowerBoundInclusive(final T from, final T to); @Override void describeTo(final Description description);  }
@Test public void testGivenThatFromIsNullWhenCreateInstanceThenNullPointerExceptionIsThrown() { thrown.expect(NullPointerException.class); IsBetweenLowerBoundInclusive.betweenLowerBoundInclusive(null, ""); fail("NullPointerException expected but not thrown"); }
@Test public void testGivenThatToIsNullWhenCreateInstanceThenNullPointerExceptionIsThrown() { thrown.expect(NullPointerException.class); IsBetweenLowerBoundInclusive.betweenLowerBoundInclusive("", null); fail("NullPointerException expected but not thrown"); }
@Test public void testGivenThatFromNotBeforeToWhenCreateInstanceThenIllegalArgumentExceptionIsThrown() { thrown.expect(IllegalArgumentException.class); IsBetweenLowerBoundInclusive.betweenLowerBoundInclusive("Z", "A"); fail("IllegalArgumentException comparison but not thrown"); }