/** Invokes the SUT with a TaskHandlerActionContext. */
  private void invokeWithTaskHandler() {
    final ActionContext originalInnerContext =
        context.mock(ActionContext.class, "originalInnerContext");
    TaskHandlerActionContext originalOuterContext =
        new TaskHandlerActionContext(originalInnerContext, userActionRequests);

    Serializable result = sut.execute(originalOuterContext, parameters);
    assertSame(results, result);
  }
  /** Invokes the SUT with a PrincipalActionContext. */
  private void invokeWithPlainAndPrincipal() {
    final PrincipalActionContext originalInnerContext =
        context.mock(PrincipalActionContext.class, "originalInnerContext");

    context.checking(
        new Expectations() {
          {
            allowing(originalInnerContext).getPrincipal();
            will(returnValue(principal));
          }
        });

    Serializable result = sut.execute(originalInnerContext, parameters);
    assertSame(results, result);
  }
 /** Invokes the SUT with a plain ActionContext. */
 private void invokeWithPlain() {
   final ActionContext originalInnerContext =
       context.mock(ActionContext.class, "originalInnerContext");
   Serializable result = sut.execute(originalInnerContext, parameters);
   assertSame(results, result);
 }