@Test public void testGet() throws Exception { Injector injector = createMock(Injector.class); PatternMatcher patternMatcher = createMock(PatternMatcher.class); underTest.injector = injector; underTest.setPatternMatcher(patternMatcher); FilterChainResolver resolver = underTest.get(); Field chainsField = SimpleFilterChainResolver.class.getDeclaredField("chains"); chainsField.setAccessible(true); Field injectorField = SimpleFilterChainResolver.class.getDeclaredField("injector"); injectorField.setAccessible(true); Field patternMatcherField = SimpleFilterChainResolver.class.getDeclaredField("patternMatcher"); patternMatcherField.setAccessible(true); assertSame(chains, chainsField.get(resolver)); assertSame(injector, injectorField.get(resolver)); assertSame(patternMatcher, patternMatcherField.get(resolver)); }
public FilterChainResolver get() { return new SimpleFilterChainResolver(chains, injector, patternMatcher); }
FilterChainResolverProvider implements ProviderWithDependencies<FilterChainResolver> { public FilterChainResolver get() { return new SimpleFilterChainResolver(chains, injector, patternMatcher); } }
FilterChainResolverProvider implements ProviderWithDependencies<FilterChainResolver> { public FilterChainResolver get() { return new SimpleFilterChainResolver(chains, injector, patternMatcher); } FilterChainResolverProvider(Map<String, Key<? extends Filter>[]> chains); }
FilterChainResolverProvider implements ProviderWithDependencies<FilterChainResolver> { public FilterChainResolver get() { return new SimpleFilterChainResolver(chains, injector, patternMatcher); } FilterChainResolverProvider(Map<String, Key<? extends Filter>[]> chains); @Inject(optional = true) void setPatternMatcher(PatternMatcher patternMatcher); Set<Dependency<?>> getDependencies(); FilterChainResolver get(); }
FilterChainResolverProvider implements ProviderWithDependencies<FilterChainResolver> { public FilterChainResolver get() { return new SimpleFilterChainResolver(chains, injector, patternMatcher); } FilterChainResolverProvider(Map<String, Key<? extends Filter>[]> chains); @Inject(optional = true) void setPatternMatcher(PatternMatcher patternMatcher); Set<Dependency<?>> getDependencies(); FilterChainResolver get();  }