@Test(expected = IllegalArgumentException.class) public void shouldAllNonNegative3() throws Exception { Utils.shouldAllPositive(1, -2, 3, 4); }
public static void shouldAllPositive(int... numbers) { for (int num : numbers) { if (num < 1) { throw new IllegalArgumentException("Number should be > 0"); } } }
Utils { public static void shouldAllPositive(int... numbers) { for (int num : numbers) { if (num < 1) { throw new IllegalArgumentException("Number should be > 0"); } } } }
Utils { public static void shouldAllPositive(int... numbers) { for (int num : numbers) { if (num < 1) { throw new IllegalArgumentException("Number should be > 0"); } } }  }
Utils { public static void shouldAllPositive(int... numbers) { for (int num : numbers) { if (num < 1) { throw new IllegalArgumentException("Number should be > 0"); } } }  static int toPositiveInt(String input); static void shouldAllPositive(int... numbers); static void shouldAllNonNegative(int... numbers); }
Utils { public static void shouldAllPositive(int... numbers) { for (int num : numbers) { if (num < 1) { throw new IllegalArgumentException("Number should be > 0"); } } }  static int toPositiveInt(String input); static void shouldAllPositive(int... numbers); static void shouldAllNonNegative(int... numbers);  }