### Question:
Util { public static <T> T checkNotNull(T reference, String errorMessageTemplate, Object... errorMessageArgs) { if (reference == null) { throw new NullPointerException( format(errorMessageTemplate, errorMessageArgs)); } return reference; } private  Util(); static void checkArgument(boolean expression,
                                   String errorMessageTemplate,
                                   Object... errorMessageArgs); static T checkNotNull(T reference,
                                   String errorMessageTemplate,
                                   Object... errorMessageArgs); static void checkState(boolean expression,
                                String errorMessageTemplate,
                                Object... errorMessageArgs); static boolean isDefault(Method method); static String emptyToNull(String string); @SuppressWarnings("unchecked") static T[] removeValues(T[] values, Predicate<T> shouldRemove, Class<T> type); @SuppressWarnings("unchecked") static T[] toArray(Iterable<? extends T> iterable, Class<T> type); static Collection<T> valuesOrEmpty(Map<String, Collection<T>> map, String key); static void ensureClosed(Closeable closeable); static Type resolveLastTypeParameter(Type genericContext, Class<?> supertype); static Object emptyValueOf(Type type); static String toString(Reader reader); static byte[] toByteArray(InputStream in); static String decodeOrDefault(byte[] data, Charset charset, String defaultValue); static boolean isNotBlank(String value); static boolean isBlank(String value); static final String CONTENT_LENGTH; static final String CONTENT_ENCODING; static final String RETRY_AFTER; static final String ENCODING_GZIP; static final String ENCODING_DEFLATE; static final Charset UTF_8; static final Charset ISO_8859_1; static final Type MAP_STRING_WILDCARD; }### Answer:
@Test public void checkNotNullInputNullNotNullNullOutputNullPointerException() { final Object reference = null; final String errorMessageTemplate = ""; final Object[] errorMessageArgs = null; thrown.expect(NullPointerException.class); Util.checkNotNull(reference, errorMessageTemplate, errorMessageArgs); }
@Test public void checkNotNullInputZeroNotNull0OutputZero() { final Object reference = 0; final String errorMessageTemplate = " "; final Object[] errorMessageArgs = {}; final Object retval = Util.checkNotNull(reference, errorMessageTemplate, errorMessageArgs); Assert.assertEquals(new Integer(0), retval); }