ArgumentChecker { public static String notBlank(String parameter, String name) { notNull(parameter, name); parameter = StringUtils.strip(parameter); if (parameter.length() == 0) { throw new IllegalArgumentException("Input parameter '" + name + "' must not be empty"); } return parameter; } private  ArgumentChecker(); static void isTrue(boolean validIfTrue, String message); static void isTrue(boolean validIfTrue, String message, Object... arg); static void isFalse(boolean validIfFalse, String message); static void isFalse(boolean validIfFalse, String message, Object... arg); static T notNull(T parameter, String name); static T notNullInjected(T parameter, String name); static String notBlank(String parameter, String name); static String notEmpty(String parameter, String name); static T[] notEmpty(T[] parameter, String name); static int[] notEmpty(int[] parameter, String name); static long[] notEmpty(long[] parameter, String name); static double[] notEmpty(double[] parameter, String name); static I notEmpty(I parameter, String name); static C notEmpty(C parameter, String name); static M notEmpty(M parameter, String name); static T[] noNulls(T[] parameter, String name); static I noNulls(I parameter, String name); static M noNulls(M parameter, String name); static int notNegative(int parameter, String name); static long notNegative(long parameter, String name); static double notNegative(double parameter, String name); static int notNegativeOrZero(int parameter, String name); static long notNegativeOrZero(long parameter, String name); static double notNegativeOrZero(double parameter, String name); static double notNegativeOrZero(double parameter, double eps, String name); @Deprecated static double notNegativeOrZero(double parameter, double eps, String message, Object... args); static double notZero(double parameter, double eps, String name); static boolean hasNullElement(Iterable<?> iterable); static boolean hasNegativeElement(Iterable<Double> iterable); static boolean isInRangeExclusive(double low, double high, double value); static boolean isInRangeInclusive(double low, double high, double value); static boolean isInRangeExcludingLow(double low, double high, double value); static boolean isInRangeExcludingHigh(double low, double high, double value); static void inOrderOrEqual(Comparable<? super T> obj1, T obj2, String param1, String param2);  }
@Test(expectedExceptions = IllegalArgumentException.class) public void test_notBlank_String_null() { try { ArgumentChecker.notBlank((String) null, "name"); } catch (IllegalArgumentException ex) { assertEquals(ex.getMessage().contains("'name'"), true); throw ex; } }
@Test(expectedExceptions = IllegalArgumentException.class) public void test_notBlank_String_empty() { try { ArgumentChecker.notBlank("", "name"); } catch (IllegalArgumentException ex) { assertEquals(ex.getMessage().contains("'name'"), true); throw ex; } }
@Test(expectedExceptions = IllegalArgumentException.class) public void test_notBlank_String_spaces() { try { ArgumentChecker.notBlank(" ", "name"); } catch (IllegalArgumentException ex) { assertEquals(ex.getMessage().contains("'name'"), true); throw ex; } }