### Question:
ApplicationEhCacheV2 extends DefaultApplicationV2 implements ApplicationEhCacheService { @Override public Set<Class<?>> getRestResourceClasses() { Set<Class<?>> s = new HashSet<Class<?>>(super.getClasses()); s.add(net.sf.ehcache.management.resource.services.ElementsResourceServiceImplV2.class); s.add(net.sf.ehcache.management.resource.services.CacheStatisticSamplesResourceServiceImplV2.class); s.add(net.sf.ehcache.management.resource.services.CachesResourceServiceImplV2.class); s.add(net.sf.ehcache.management.resource.services.CacheManagersResourceServiceImplV2.class); s.add(net.sf.ehcache.management.resource.services.CacheManagerConfigsResourceServiceImplV2.class); s.add(net.sf.ehcache.management.resource.services.CacheConfigsResourceServiceImplV2.class); s.add(net.sf.ehcache.management.resource.services.QueryResourceServiceImplV2.class); return s; }  @Override Set<Class<?>> getRestResourceClasses(); @Override Map<Class<?>, Object> getServiceClasses(ManagementRESTServiceConfiguration configuration, RemoteAgentEndpointImpl agentEndpointImpl); @Override Class<? extends ManagementServerLifecycle> getManagementServerLifecyle();  }### Answer:
@Test public void testGetClasses() throws Exception { ApplicationEhCacheV2 applicationEhCache = new ApplicationEhCacheV2(); Set<Class<?>> filteredApplicationClasses = filterClassesFromJaxRSPackages(applicationEhCache.getRestResourceClasses()); Set<Class<?>> annotatedClasses = annotatedClassesFound(); Set<Class<?>> classesToIgnoreDuringComparison = new HashSet<Class<?>>(); if (filteredApplicationClasses.size() > annotatedClasses.size()) { for (Class<?> applicationClass : filteredApplicationClasses) { if(!annotatedClasses.contains(applicationClass)) { fail("While scanning the classpath, we could not find " + applicationClass); } } } else { for (Class<?> annotatedClass : annotatedClasses) { if (!filteredApplicationClasses.contains(annotatedClass)) { fail("Should " + annotatedClass + " be added to DefaultApplicationCommon ?"); } } } filteredApplicationClasses.removeAll(classesToIgnoreDuringComparison); Assert.assertThat(annotatedClasses, equalTo(filteredApplicationClasses)); }