@Test public void testGetExtraHiddenFields02() { TransactionTokenRequestDataValueProcessor processor = new TransactionTokenRequestDataValueProcessor(); HttpServletRequest request = mock(HttpServletRequest.class); TransactionToken token = new TransactionToken("tokenName", "tokenkey", "tokenValue"); when((TransactionToken) request.getAttribute( TransactionTokenInterceptor.NEXT_TOKEN_REQUEST_ATTRIBUTE_NAME)) .thenReturn(token); Map<String, String> result = processor.getExtraHiddenFields(request); Map<String, String> expected = new HashMap<String, String>(); expected.put("_TRANSACTION_TOKEN", token.getTokenString()); assertThat(result, is(expected)); }
@Override public Map<String, String> getExtraHiddenFields( HttpServletRequest request) { TransactionToken nextToken = (TransactionToken) request.getAttribute( TransactionTokenInterceptor.NEXT_TOKEN_REQUEST_ATTRIBUTE_NAME); if (nextToken != null) { Map<String, String> map = new HashMap<String, String>(2); map.put(TransactionTokenInterceptor.TOKEN_REQUEST_PARAMETER, nextToken.getTokenString()); return map; } return null; }
TransactionTokenRequestDataValueProcessor extends
                                                       RequestDataValueProcessorAdaptor { @Override public Map<String, String> getExtraHiddenFields( HttpServletRequest request) { TransactionToken nextToken = (TransactionToken) request.getAttribute( TransactionTokenInterceptor.NEXT_TOKEN_REQUEST_ATTRIBUTE_NAME); if (nextToken != null) { Map<String, String> map = new HashMap<String, String>(2); map.put(TransactionTokenInterceptor.TOKEN_REQUEST_PARAMETER, nextToken.getTokenString()); return map; } return null; } }
TransactionTokenRequestDataValueProcessor extends
                                                       RequestDataValueProcessorAdaptor { @Override public Map<String, String> getExtraHiddenFields( HttpServletRequest request) { TransactionToken nextToken = (TransactionToken) request.getAttribute( TransactionTokenInterceptor.NEXT_TOKEN_REQUEST_ATTRIBUTE_NAME); if (nextToken != null) { Map<String, String> map = new HashMap<String, String>(2); map.put(TransactionTokenInterceptor.TOKEN_REQUEST_PARAMETER, nextToken.getTokenString()); return map; } return null; }  }
TransactionTokenRequestDataValueProcessor extends
                                                       RequestDataValueProcessorAdaptor { @Override public Map<String, String> getExtraHiddenFields( HttpServletRequest request) { TransactionToken nextToken = (TransactionToken) request.getAttribute( TransactionTokenInterceptor.NEXT_TOKEN_REQUEST_ATTRIBUTE_NAME); if (nextToken != null) { Map<String, String> map = new HashMap<String, String>(2); map.put(TransactionTokenInterceptor.TOKEN_REQUEST_PARAMETER, nextToken.getTokenString()); return map; } return null; }  @Override Map<String, String> getExtraHiddenFields(
            HttpServletRequest request); }
TransactionTokenRequestDataValueProcessor extends
                                                       RequestDataValueProcessorAdaptor { @Override public Map<String, String> getExtraHiddenFields( HttpServletRequest request) { TransactionToken nextToken = (TransactionToken) request.getAttribute( TransactionTokenInterceptor.NEXT_TOKEN_REQUEST_ATTRIBUTE_NAME); if (nextToken != null) { Map<String, String> map = new HashMap<String, String>(2); map.put(TransactionTokenInterceptor.TOKEN_REQUEST_PARAMETER, nextToken.getTokenString()); return map; } return null; }  @Override Map<String, String> getExtraHiddenFields(
            HttpServletRequest request);  }