@Test public void actionがそのまま返却される() throws Exception { String inputAction = "/foo/bar"; TokenManager manager = new TokenManager(); manager.afterPropertiesSet(); TokenRequestDataValueProcessing t = new TokenRequestDataValueProcessing(); Field managerField = t.getClass().getDeclaredField("manager"); managerField.setAccessible(true); managerField.set(t, manager); String processedAction = t.processAction(request, inputAction); assertThat(processedAction, is(inputAction)); }
public String processAction(HttpServletRequest request, String action) { return action; }
TokenRequestDataValueProcessing implements RequestDataValueProcessor { public String processAction(HttpServletRequest request, String action) { return action; } }
TokenRequestDataValueProcessing implements RequestDataValueProcessor { public String processAction(HttpServletRequest request, String action) { return action; } TokenRequestDataValueProcessing(); }
TokenRequestDataValueProcessing implements RequestDataValueProcessor { public String processAction(HttpServletRequest request, String action) { return action; } TokenRequestDataValueProcessing(); String processAction(HttpServletRequest request, String action); @Override String processAction(HttpServletRequest request, String action, String httpMethod); @Override String processFormFieldValue(HttpServletRequest request, String name, String value, String type); @Override Map<String, String> getExtraHiddenFields(HttpServletRequest request); @Override String processUrl(HttpServletRequest request, String url); }
TokenRequestDataValueProcessing implements RequestDataValueProcessor { public String processAction(HttpServletRequest request, String action) { return action; } TokenRequestDataValueProcessing(); String processAction(HttpServletRequest request, String action); @Override String processAction(HttpServletRequest request, String action, String httpMethod); @Override String processFormFieldValue(HttpServletRequest request, String name, String value, String type); @Override Map<String, String> getExtraHiddenFields(HttpServletRequest request); @Override String processUrl(HttpServletRequest request, String url);  }