@Test public void test() { context.checking(new Expectations() { { allowing(actionContext).getParams(); will(returnValue(5L)); allowing(mapper).execute(with(any(FindByIdRequest.class))); will(returnValue(entity)); allowing(indexer).execute(entity); } }); sut.execute(actionContext); context.assertIsSatisfied(); }
@Override public Serializable execute(final ActionContext inActionContext) { DomainEntity entity = objectMapper.execute(new FindByIdRequest(domainEntityName, (Long) inActionContext .getParams())); if (entity != null) { objectIndexer.execute(entity); } return null; }
IndexDomainEntityByIdExecution implements ExecutionStrategy<ActionContext> { @Override public Serializable execute(final ActionContext inActionContext) { DomainEntity entity = objectMapper.execute(new FindByIdRequest(domainEntityName, (Long) inActionContext .getParams())); if (entity != null) { objectIndexer.execute(entity); } return null; } }
IndexDomainEntityByIdExecution implements ExecutionStrategy<ActionContext> { @Override public Serializable execute(final ActionContext inActionContext) { DomainEntity entity = objectMapper.execute(new FindByIdRequest(domainEntityName, (Long) inActionContext .getParams())); if (entity != null) { objectIndexer.execute(entity); } return null; } IndexDomainEntityByIdExecution(final FindByIdMapper<DomainEntity> inObjectMapper,
            final IndexEntity<DomainEntity> inObjectIndexer, final String inDomainEntityName); }
IndexDomainEntityByIdExecution implements ExecutionStrategy<ActionContext> { @Override public Serializable execute(final ActionContext inActionContext) { DomainEntity entity = objectMapper.execute(new FindByIdRequest(domainEntityName, (Long) inActionContext .getParams())); if (entity != null) { objectIndexer.execute(entity); } return null; } IndexDomainEntityByIdExecution(final FindByIdMapper<DomainEntity> inObjectMapper,
            final IndexEntity<DomainEntity> inObjectIndexer, final String inDomainEntityName); @Override Serializable execute(final ActionContext inActionContext); }
IndexDomainEntityByIdExecution implements ExecutionStrategy<ActionContext> { @Override public Serializable execute(final ActionContext inActionContext) { DomainEntity entity = objectMapper.execute(new FindByIdRequest(domainEntityName, (Long) inActionContext .getParams())); if (entity != null) { objectIndexer.execute(entity); } return null; } IndexDomainEntityByIdExecution(final FindByIdMapper<DomainEntity> inObjectMapper,
            final IndexEntity<DomainEntity> inObjectIndexer, final String inDomainEntityName); @Override Serializable execute(final ActionContext inActionContext);  }