Here you can find the source of assertNotNull(T exception, Object... objects)
public static <T extends Exception> void assertNotNull(T exception, Object... objects) throws T
//package com.java2s; //License from project: Apache License public class Main { public static <T extends Exception> void assertNotNull(T exception, Object... objects) throws T { for (Object object : objects) { if (object == null) { throw exception; }//from w w w.ja va2s. c om } } }