@Test
public void getResource() throws Exception {

    // load from context loader
    assertNull(ClassLoaderUtil.getResource(null));
    assertNotNull(ClassLoaderUtil.getResource("META-INF/MANIFEST.MF"));
    // load from class referrer
    assertNull(ClassLoaderUtil.getResource(null, getClass()));
    assertNull(ClassLoaderUtil.getResource(null, (Class<?>) null));
    assertNotNull(ClassLoaderUtil.getResource("META-INF/MANIFEST.MF", getClass()));
    assertNotNull(ClassLoaderUtil.getResource("META-INF/MANIFEST.MF", (Class<?>) null));
    // load from specified loader
    assertNull(ClassLoaderUtil.getResource(null, getClass().getClassLoader()));
    assertNull(ClassLoaderUtil.getResource(null, (ClassLoader) null));
    assertNotNull(ClassLoaderUtil.getResource("META-INF/MANIFEST.MF", getClass().getClassLoader()));
    assertNotNull(ClassLoaderUtil.getResource("META-INF/MANIFEST.MF", (ClassLoader) null));
}