@Test
public void prod_ExceptionPipeline() throws Exception {
System.setProperty("exceptionPipelineNameFromSystemProperties", "myExceptionPipeline");
prepareWebClient(null);
TestValve.runnerHolder.set(new ValveRunner() {
public void run(RunData rundata, PipelineContext pipelineContext) throws Exception {
throw new IllegalStateException("wrong!");
}
});
TestExceptionValve.runnerHolder.set(new ValveRunner() {
public void run(RunData rundata, PipelineContext pipelineContext) throws Exception {
rundata.setContentType("text/plain");
rundata.getResponse().getWriter().println("error page from valve");
}
});