TransactionTokenInterceptor implements HandlerInterceptor { TransactionToken createReceivedToken(final HttpServletRequest request) { String tokenStr = request.getParameter(TOKEN_REQUEST_PARAMETER); TransactionToken currentToken = new TransactionToken(tokenStr); return currentToken; } TransactionTokenInterceptor();  TransactionTokenInterceptor(int sizePerTokenName);  TransactionTokenInterceptor(TokenStringGenerator generator,
            TransactionTokenInfoStore tokenInfoStore,
            TransactionTokenStore tokenStore); @Override boolean preHandle(final HttpServletRequest request,
            final HttpServletResponse response, final Object handler); @Override void postHandle(final HttpServletRequest request,
            final HttpServletResponse response, final Object handler,
            final ModelAndView modelAndView); @Override void afterCompletion(final HttpServletRequest request,
            final HttpServletResponse response, final Object handler,
            final Exception ex); static final String TOKEN_CONTEXT_REQUEST_ATTRIBUTE_NAME; static final String NEXT_TOKEN_REQUEST_ATTRIBUTE_NAME; static final String TOKEN_REQUEST_PARAMETER; }
@Test public void testCreateReceivedToken() { request.setParameter( TransactionTokenInterceptor.TOKEN_REQUEST_PARAMETER, "a~b~c"); TransactionToken token = interceptor.createReceivedToken(request); assertThat(token.getTokenName(), is("a")); }