### Question:
ClassLoaderResolver implements ResourceResolver { public InputStream getAsStream(String name) { return loader.getResourceAsStream(name); } ClassLoaderResolver();  ClassLoaderResolver(ClassLoader l); T resolve(String resourceName, Class<T> resourceType); InputStream getAsStream(String name);  }### Answer:
@Test public void testGetAsStream() throws IOException { InputStream in = clr.getAsStream(resourceName); assertNotNull(in); BufferedReader reader = new BufferedReader(new InputStreamReader(in)); String content = reader.readLine(); assertEquals("resource content incorrect", RESOURCE_DATA, content); reader.close(); }
@Test public void testGetAsStream() throws IOException { InputStream in = clr.getAsStream(resourceName); assertNotNull(in); BufferedReader reader = new BufferedReader(new InputStreamReader(in)); String content = reader.readLine(); assertEquals("resource content incorrect", RESOURCE_DATA, content); }