AbstractContext implements Context.Impl { @Override public void setRoute(Route route) { this.route = route; } @Inject  AbstractContext(
            BodyParserEngineManager bodyParserEngineManager,
            FlashScope flashScope,
            NinjaProperties ninjaProperties,
            Session session,
            Validation validation,
            Injector injector,
            ParamParsers paramParsers); @Override void setRoute(Route route); @Override Route getRoute(); @Override Validation getValidation(); @Deprecated @Override FlashScope getFlashCookie(); @Override FlashScope getFlashScope(); @Deprecated @Override Session getSessionCookie(); @Override Session getSession(); @Override String getContextPath(); @Override String getRequestPath(); @Override String getRemoteAddr(); @Override T getAttribute(String name, Class<T> clazz); @Override String getPathParameter(String key); @Override String getPathParameterEncoded(String key); @Override Integer getPathParameterAsInteger(String key); @Override String getParameter(String key, String defaultValue); @Override Integer getParameterAsInteger(String key); @Override Integer getParameterAsInteger(String key, Integer defaultValue); @Override T getParameterAs(String key, Class<T> clazz); @Override T getParameterAs(String key, Class<T> clazz, T defaultValue); @Override T parseBody(Class<T> classOfT); @Override String getCookieValue(String name); @Override void unsetCookie(Cookie cookie); @Override void asyncRequestComplete(); @Override ResponseStreams finalizeHeadersWithoutFlashAndSessionCookie(Result result); @Override ResponseStreams finalizeHeaders(Result result); @Override String getAcceptContentType(); @Override String getAcceptEncoding(); @Override String getAcceptLanguage(); @Override String getAcceptCharset(); @Override boolean isRequestJson(); @Override boolean isRequestXml();  }
@Test public void getPathParameterDecodingWorks() { AbstractContextImpl context = spy(abstractContext); Map<String, String> parameterMap = Maps.newHashMap(); parameterMap.put("parameter", "blue%2Fred%3Fand+green%E2%82%AC%2f"); when(route.getPathParametersEncoded(ArgumentMatchers.anyString())).thenReturn(parameterMap); context.setRoute(route); assertEquals("blue/red?and+green€/", context.getPathParameter("parameter")); }