public static int checkPositive(int value, String paramName) {
        if (value <= 0) {
            throw new IllegalArgumentException(paramName + " is " + value + " but must be > 0");
        }
        return value;
    }
@Test(expected = IllegalArgumentException.class)
    public void test_checkPositive_whenNegative() {
        checkPositive(-1, "foo");
    }