use of io.undertow.server.handlers.SetHeaderHandler in project undertow by undertow-io.
the class PredicatedHandlersParserTestCase method testParsedHandler2.
@Test
public void testParsedHandler2() {
String value = "header(header=a, value='a%%lb')";
List<PredicatedHandler> ret = PredicatedHandlersParser.parse(value, getClass().getClassLoader());
Assert.assertEquals(1, ret.size());
SetHeaderHandler handler = (SetHeaderHandler) ret.get(0).getHandler().wrap(ResponseCodeHandler.HANDLE_200);
Assert.assertEquals("a", handler.getHeader().toString());
Assert.assertEquals("a%lb", handler.getValue().readAttribute(null));
}
Aggregations