Preconditions { public static void checkGreaterThanZero(int number, String message) { if (number <= 0) { throw new IllegalArgumentException(message); } }  static void checkNotNull(Object object, String message); static void checkNotNullOrEmpty(String string, String message); static void checkGreaterOrEqualToZero(int number, String message); static void checkGreaterThanZero(int number, String message); static boolean isAtLeastAndroidLollipop(); static boolean isAtLeastAndroidMarshmallow();  }
@Test(expected = IllegalArgumentException.class) public void shouldThrowAnExceptionWhenValueIsZero() { Preconditions.checkGreaterThanZero(0, MSG_VALUE_IS_NOT_GREATER_THAN_ZERO); }
@Test(expected = IllegalArgumentException.class) public void shouldThrowAnExceptionWhenValueLowerThanZero() { Preconditions.checkGreaterThanZero(-1, MSG_VALUE_IS_NOT_GREATER_THAN_ZERO); }
@Test public void shouldNotThrowAnythingWhenValueIsGreaterThanZero() { Preconditions.checkGreaterThanZero(1, MSG_VALUE_IS_NOT_GREATER_THAN_ZERO); }