### Question:
TyrusServerConfiguration implements ServerApplicationConfig { @Override public Set<Class<?>> getAnnotatedEndpointClasses(Set<Class<?>> scanned) { return Collections.unmodifiableSet(annotatedClasses); } TyrusServerConfiguration(Set<Class<?>> classes, Set<ServerEndpointConfig> serverEndpointConfigs);  TyrusServerConfiguration(Set<Class<?>> classes, Set<Class<?>> dynamicallyAddedClasses,
                                    Set<ServerEndpointConfig> serverEndpointConfigs, ErrorCollector errorCollector); @Override Set<ServerEndpointConfig> getEndpointConfigs(Set<Class<? extends Endpoint>> scanned); @Override Set<Class<?>> getAnnotatedEndpointClasses(Set<Class<?>> scanned);  }### Answer:
@Test public void testNoServerApplicationConfig() { Set<Class<?>> scanned = new HashSet<Class<?>>() { { add(AnnotatedA.class); add(AnnotatedB.class); add(ProgrammaticConfA.class); add(ProgrammaticConfB.class); add(Other.class); } }; TyrusServerConfiguration configuration = new TyrusServerConfiguration(scanned, Collections .<ServerEndpointConfig>emptySet()); Assert.assertEquals(2, configuration.getAnnotatedEndpointClasses(null).size()); Assert.assertTrue(configuration.getAnnotatedEndpointClasses(null).contains(AnnotatedA.class)); Assert.assertTrue(configuration.getAnnotatedEndpointClasses(null).contains(AnnotatedB.class)); }
@Test public void testOneServerApplicationConfig() { Set<Class<?>> scanned = new HashSet<Class<?>>() { { add(ApplicationConfA.class); add(ProgrammaticConfB.class); add(AnnotatedB.class); add(Other.class); } }; TyrusServerConfiguration configuration = new TyrusServerConfiguration(scanned, Collections .<ServerEndpointConfig>emptySet()); Assert.assertEquals(1, configuration.getAnnotatedEndpointClasses(null).size()); Assert.assertTrue(configuration.getAnnotatedEndpointClasses(null).contains(AnnotatedA.class)); }
@Test public void testTwoServerApplicationConfig() { Set<Class<?>> scanned = new HashSet<Class<?>>() { { add(ApplicationConfA.class); add(ApplicationConfB.class); add(AnnotatedC.class); add(ProgrammaticC.class); add(ProgrammaticConfC.class); add(Other.class); } }; TyrusServerConfiguration configuration = new TyrusServerConfiguration(scanned, Collections .<ServerEndpointConfig>emptySet()); Assert.assertEquals(1, configuration.getAnnotatedEndpointClasses(null).size()); Assert.assertTrue(configuration.getAnnotatedEndpointClasses(null).contains(AnnotatedA.class)); }