I am working on a project using Spring Web Flow 2.0.
I am trying to unit test a thread that starts with a decision state. The status of the solution checks the value of the object located on the conversationScope . I cannot figure out how to insert a value in conversationScope for unit test.
I tried:
getConversationScope().put("someName", value); MockExternalContext context = new MockExternalContext(); startFlow(context);
However, it seems that when I call startFlow(context) , the value is cleared.
I also tried:
MockExternalContext context = new MockExternalContext(); setCurrentState("someDecisionState"); resumeFlow(context)
But the test fails with an error informing me that I cannot resume the action from the decision state, only from the view state.
Does anyone know how I can embed mock values in conversationScope so that I can check these cases?
source share