Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8622073
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T06:57:58+00:00 2026-06-12T06:57:58+00:00

This is similar to Spring Web Flow – How can I set up unit

  • 0

This is similar to Spring Web Flow – How can I set up unit test with values already in conversationScope?

I’ve used the solution listed in that question to solve a conversationScope issue, but have been hitting a wall trying to do the same for FlowScope. For some reason, FlowExecution does not have a getFlowScope() method.

Any helps or general pointing in the right direction will be very much appreciated. Thanks!

Update:

To give more context, this is the line in the webflow I’m trying to test:

<evaluate expression="serviceFactory.getInstance(flowScope.config.country).startTransaction(flowScope.SomeList.get(0), 0)" />

and the relavant test statement is:

EasyMock.expect(serviceObjectMock.startTransaction(someObjectMock, 0)).andReturn(true);

and it fails silently. When I walk through the code in the debugger, I see that there was an IndexOutOfBoundsException on this call, which led to my assumption that I have to have the list somehow in flowScope.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T06:57:59+00:00Added an answer on June 12, 2026 at 6:57 am

    For anybody who’s interested, I learnt that I did not have to explicitly set the attribute in the flowScope, as EasyMock handles that while it goes through the list of “expects”.

    My problem was that “flowScope.SomeList.get(0)” refers to an attribute that was set in the previous line, and I used “new ArrayList()” as a return value in the “expect” statement for that line.

    And also, the “failing silently” part was due to me not enabling DEBUG level info in the test profile for Spring.

    This in the test log4j.xml file solved the problem:

        <logger name="org.springframework">
        <level value="DEBUG" />
    </logger>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have web application which using spring wicket and sql-processor (similar to mybatis) which
i am trying to include spring security in a web application. For this i
I am using spring-ws for a web service and can't seem to figure out
I've seen this code (and similar) all over the web, but I just cannot
I need to split this/similar string to get the VALUE <a href=javascript:void(0); id=def_ name=color
I've got code similar to this: string s = CreateString(); if (s == )
Hi i am using HttpClient similar to this: public static Task<string> AsyncStringRequest(string url, string
I have a large string, similar to this one: BREW pot HTCPCP/1.0 Accept-Additions: #milk;3#whiskey;splash
I have code similar to this: public List<string> Expected = new List<string>(); public int
I have an array similar to this: array(2) { [0]=> array(2) { [code]=> string(2)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.