@Test
public void testQueryDecoderCache() throws Exception {
ServletStyleUriConstraintKey<ByteBuf> key = new ServletStyleUriConstraintKey<>("d/a/b/c", "d");
Channel mockChannel = new MockChannelHandlerContext("mock").channel();
HttpKeyEvaluationContext context = new HttpKeyEvaluationContext(mockChannel);
HttpServerRequest<ByteBuf> request = newRequest("/d/a/b/c/");
boolean keyApplicable = key.apply(request, context);
Assert.assertTrue("Exact match servlet style constraint failed.", keyApplicable);
HttpKeyEvaluationContext context2 = new HttpKeyEvaluationContext(mockChannel);
request = newRequest("/x/y/z");
keyApplicable = key.apply(request, context2);
Assert.assertFalse("Query decoder cache not cleared..", keyApplicable);
}