private void assertResponderType(Class<?> expectedClass) throws Exception { Responder responder = factory.makeResponder(request); assertEquals(expectedClass, responder.getClass()); }
private void checkResponderKey(String queryString, String key) { MockRequest request = new MockRequest(); request.setQueryString(queryString); assertEquals(key, factory.getResponderKey(request)); }
@Test public void testAddingResponders() throws Exception { factory.addResponder("custom", WikiPageResponder.class); assertResponderTypeMatchesInput("custom", WikiPageResponder.class); }