@Test public void testExecuteTaskContextPrincipal() { final ActionContext parentInnerContext = new ServiceActionContext(otherParams, principal); final TaskHandlerActionContext parentContext = new TaskHandlerActionContextImpl(parentInnerContext, userActionRequests); mockery.checking(new Expectations() { { oneOf(executionTH).execute(with(new EasyMatcher<TaskHandlerActionContext<PrincipalActionContext>>() { @Override protected boolean isMatch(final TaskHandlerActionContext<PrincipalActionContext> inTestObject) { PrincipalActionContext inner = inTestObject.getActionContext(); return inTestObject.getUserActionRequests() == userActionRequests && inner.getParams() == params && inner.getPrincipal() == principal && inner.getState() != null && inner.getState() != parentInnerContext.getState(); } })); will(returnValue(result)); } }); assertSame(result, sut.execute(executionTH, params, parentContext)); mockery.assertIsSatisfied(); }
public Serializable execute(final ExecutionStrategy execution, final Serializable params, final Principal principal) { PrincipalActionContext context = new ServiceActionContext(params, principal); return execution.execute(context); }
InlineExecutionStrategyExecutor { public Serializable execute(final ExecutionStrategy execution, final Serializable params, final Principal principal) { PrincipalActionContext context = new ServiceActionContext(params, principal); return execution.execute(context); } }
InlineExecutionStrategyExecutor { public Serializable execute(final ExecutionStrategy execution, final Serializable params, final Principal principal) { PrincipalActionContext context = new ServiceActionContext(params, principal); return execution.execute(context); }  }
InlineExecutionStrategyExecutor { public Serializable execute(final ExecutionStrategy execution, final Serializable params, final Principal principal) { PrincipalActionContext context = new ServiceActionContext(params, principal); return execution.execute(context); }  Serializable execute(final ExecutionStrategy execution, final Serializable params, final Principal principal); Serializable execute(final ExecutionStrategy execution, final Serializable params,
            final ActionContext parentContext); Serializable execute(final TaskHandlerExecutionStrategy execution, final Serializable params,
            final Principal principal, final List<UserActionRequest> requests); Serializable execute(final TaskHandlerExecutionStrategy execution, final Serializable params,
            final TaskHandlerActionContext< ? extends ActionContext> parentContext); }
InlineExecutionStrategyExecutor { public Serializable execute(final ExecutionStrategy execution, final Serializable params, final Principal principal) { PrincipalActionContext context = new ServiceActionContext(params, principal); return execution.execute(context); }  Serializable execute(final ExecutionStrategy execution, final Serializable params, final Principal principal); Serializable execute(final ExecutionStrategy execution, final Serializable params,
            final ActionContext parentContext); Serializable execute(final TaskHandlerExecutionStrategy execution, final Serializable params,
            final Principal principal, final List<UserActionRequest> requests); Serializable execute(final TaskHandlerExecutionStrategy execution, final Serializable params,
            final TaskHandlerActionContext< ? extends ActionContext> parentContext);  }