HashMap successParams = new HashMap();
successParams.put("propertyName", "executionCount");
successParams.put("expectedValue", "1");
ActionConfig executionCountActionConfig = new ActionConfig.Builder("", "", ExecutionCountTestAction.class.getName())
.addResultConfig(new ResultConfig.Builder(Action.SUCCESS, TestResult.class.getName())
.addParams(successParams)
.build())
.build();
ActionConfig testActionConfig = new ActionConfig.Builder("", "", TestAction.class.getName())
.addResultConfig(new ResultConfig.Builder(Action.SUCCESS, ServletDispatcherResult.class.getName())
.addParam("location", "success.jsp")
.build())
.addInterceptor(new InterceptorMapping("params", new ParametersInterceptor()))
.build();
ActionConfig tokenActionConfig = new ActionConfig.Builder("", "", TestAction.class.getName())
.addInterceptor(new InterceptorMapping("token", new TokenInterceptor()))
.addResultConfig(new ResultConfig.Builder("invalid.token", MockResult.class.getName()).build())
.addResultConfig(new ResultConfig.Builder("success", MockResult.class.getName()).build())
.build();
// empty results for token session unit test
ActionConfig tokenSessionActionConfig = new ActionConfig.Builder("", "", TestAction.class.getName())
.addResultConfig(new ResultConfig.Builder("invalid.token", MockResult.class.getName()).build())
.addResultConfig(new ResultConfig.Builder("success", MockResult.class.getName()).build())
.addInterceptor(new InterceptorMapping("tokenSession", new TokenSessionStoreInterceptor()))
.build();