@Test public void verifyRequireNonNullReturnsValue() throws Exception { final String value = "foo"; final String returned = requireNonNull(value, "foo"); assertThat(returned, is(value)); }
static <T> T requireNonNull(final T obj, final String message, final Object... args) { if (obj == null) { throw new NullPointerException(String.format(message, args)); } return obj; }
Objects { static <T> T requireNonNull(final T obj, final String message, final Object... args) { if (obj == null) { throw new NullPointerException(String.format(message, args)); } return obj; } }
Objects { static <T> T requireNonNull(final T obj, final String message, final Object... args) { if (obj == null) { throw new NullPointerException(String.format(message, args)); } return obj; } private  Objects(); }
Objects { static <T> T requireNonNull(final T obj, final String message, final Object... args) { if (obj == null) { throw new NullPointerException(String.format(message, args)); } return obj; } private  Objects();  }
Objects { static <T> T requireNonNull(final T obj, final String message, final Object... args) { if (obj == null) { throw new NullPointerException(String.format(message, args)); } return obj; } private  Objects();   }