ToriUtil { public static void checkForNull(final Object object, final String errorMessage) throws IllegalArgumentException { if (object == null) { throw new IllegalArgumentException(errorMessage); } } private  ToriUtil(); static void checkForNull(final Object object,
            final String errorMessage); static String escapeXhtml(final String xhtml);  }
@Test(expected = IllegalArgumentException.class) public void checkForNullWhenGivenNull() { ToriUtil.checkForNull(null, "null was given"); }
@Test public void checkForNullWhenGivenNonNull() { ToriUtil.checkForNull(true, "null was not given"); }