@Test
public void captureQuestionResponses() throws Exception {

    String redoLoan = "redoLoan";
    when(form.getPerspective()).thenReturn(redoLoan);
    ActionErrors errors = mock(ActionErrors.class);
    ActionForward forward = mock(ActionForward.class);
    when(createLoanQuestionnaire.validateResponses(request, form)).thenReturn(errors);
    when(errors.isEmpty()).thenReturn(true);
    when(createLoanQuestionnaire.rejoinFlow(mapping)).thenReturn(forward);
    loanAccountAction.captureQuestionResponses(mapping, form, request, response);
    verify(request,times(1)).setAttribute(eq(LoanConstants.METHODCALLED), eq("captureQuestionResponses"));
    verify(request,times(1)).setAttribute(PERSPECTIVE, redoLoan);
    verify(createLoanQuestionnaire).rejoinFlow(mapping);
}