SecurityPluginPreproccessor implements Postprocessor { @Override public void process(Request request, Response response) { HashMap<String, List<String>> headers = extractHeadersFromRequest(request); for (SecurityPlugin plugin : securityPlugins) { logger.debug("Running security plugin: " + plugin.getPluginName()); try { plugin.doValidate(headers, request.getPath(), HttpMethod.forString(request.getHttpMethod().name())); } catch (PermissionDeniedException e) { throw new SecurityException(e.getMessage()); } } } SecurityPluginPreproccessor(); @Override void process(Request request, Response response); static HashMap<String, List<String>> extractHeadersFromRequest(Request request);  }
@Test public void testProcess() { System.out.println("process"); Request request = createTestRequest(); Response response = null; SecurityPluginPreproccessor instance = new SecurityPluginPreproccessor(); instance.process(request, response); assertEquals("test4", System.getProperty("com.pearson.docussandra.testHeader_2")); assertEquals("test4", System.getProperty("com.pearson.docussandra.testHeader_2.secondtest")); }