6768697071727374757677
t.addThreadCleanupListener(l); HttpServletRequest request = new MockRequest(); f.doFilter(request, new MockResponse(), new MockFilterChain()); assertSame(r, HiveMindFilter.getRegistry(request)); assertEquals(true, l.getCleanup());
9899100101102103104105106107108
// It's a NPE that gets thrown. assertLoggedMessage("null"); f.doFilter(new MockRequest(), new MockResponse(), new MockFilterChain()); f.destroy(); } public void testDestroyWithoutRepository()
116117118119120121122123124125126
{ Filter f = new HiveMindFilter(); interceptLogging(HiveMindFilter.class.getName()); f.doFilter(new MockRequest(), new MockResponse(), new MockFilterChain()); assertLoggedMessage("Unable to cleanup current thread"); } }