### Question:
WebClassesFinder extends AbstractClassFinder { public WebClassesFinder(ServletContext servletContext, ClassLoader classLoader, PackageFilter packageFilter) { super(servletContext, classLoader, packageFilter); } WebClassesFinder(ServletContext servletContext, ClassLoader classLoader, PackageFilter packageFilter); void findClasses(PrettyAnnotationHandler handler);  }### Answer:
@Test public void testWebClassesFinder() throws Exception { URL classesUrl = new URL("file:/somewhere/WEB-INF/classes/"); URL packageUrl = new URL("file:/somewhere/WEB-INF/classes/package/"); URL classUrl = new URL("file:/somewhere/WEB-INF/classes/package/TestClass.class"); Set<String> classesDirectory = new HashSet<String>(Arrays.asList("/WEB-INF/classes/package/")); Set<String> packageDirectory = new HashSet<String>(Arrays.asList("/WEB-INF/classes/package/TestClass.class")); PackageFilter filter = new PackageFilter(null); ServletContext servletContext = EasyMock.createNiceMock(ServletContext.class); EasyMock.expect(servletContext.getResource("/WEB-INF/classes/")).andReturn(classesUrl).anyTimes(); EasyMock.expect(servletContext.getResourcePaths("/WEB-INF/classes/")).andReturn(classesDirectory).anyTimes(); EasyMock.expect(servletContext.getResource("/WEB-INF/classes/package/")).andReturn(packageUrl).anyTimes(); EasyMock.expect(servletContext.getResourcePaths("/WEB-INF/classes/package/")).andReturn(packageDirectory).anyTimes(); EasyMock.expect(servletContext.getResource("/WEB-INF/classes/package/TestClass.class")).andReturn(classUrl).anyTimes(); EasyMock.replay(servletContext); ClassLoader classLoader = EasyMock.createNiceMock(ClassLoader.class); EasyMock.expect(classLoader.loadClass("package.TestClass")).andReturn((Class) ClassFinderTestBean.class).anyTimes(); EasyMock.replay(classLoader); PrettyAnnotationHandler handler = EasyMock.createMock(PrettyAnnotationHandler.class); handler.processClass(ClassFinderTestBean.class); EasyMock.expectLastCall().once(); EasyMock.replay(handler); WebClassesFinder finder = new WebClassesFinder(servletContext, classLoader, filter); finder.findClasses(handler); EasyMock.verify(handler); }