public static void requireNotNull(final Object obj, final String name) {
    if (obj == null) {
      throw new NullPointerException(name + " must not be null");
    }
  }
@Test(expectedExceptions = NullPointerException.class, expectedExceptionsMessageRegExp = ".*foo.*")
  public void testNotNullWithNull() {
    ArgumentUtil.requireNotNull(null, "foo");
  }