@Test public final void executeTest() { final Long personId = 2L; final List<StreamScope> bookmarksList = new ArrayList<StreamScope>(); final List<StreamFilter> filterList = new ArrayList<StreamFilter>(); context.checking(new Expectations() { { oneOf(actionContext).getPrincipal(); will(returnValue(principal)); oneOf(principal).getId(); will(returnValue(personId)); oneOf(bookmarksMapper).execute(personId); will(returnValue(bookmarksList)); oneOf(bookmarksTransformer).transform(bookmarksList); will(returnValue(filterList)); } }); Assert.assertEquals(filterList, sut.execute(actionContext)); context.assertIsSatisfied(); }
public Serializable execute(final PrincipalActionContext inActionContext) throws ExecutionException { final List<StreamFilter> filters = bookmarkTransformer.transform(getUserBookmarksMapper.execute(inActionContext .getPrincipal().getId())); return (Serializable) filters; }
GetCurrentUsersBookmarksExecution implements ExecutionStrategy<PrincipalActionContext> { public Serializable execute(final PrincipalActionContext inActionContext) throws ExecutionException { final List<StreamFilter> filters = bookmarkTransformer.transform(getUserBookmarksMapper.execute(inActionContext .getPrincipal().getId())); return (Serializable) filters; } }
GetCurrentUsersBookmarksExecution implements ExecutionStrategy<PrincipalActionContext> { public Serializable execute(final PrincipalActionContext inActionContext) throws ExecutionException { final List<StreamFilter> filters = bookmarkTransformer.transform(getUserBookmarksMapper.execute(inActionContext .getPrincipal().getId())); return (Serializable) filters; } GetCurrentUsersBookmarksExecution(final DomainMapper<Long, List<StreamScope>> inGetUserBookmarksMapper,
            final Transformer<List<StreamScope>, List<StreamFilter>> inBookmarkTransformer); }
GetCurrentUsersBookmarksExecution implements ExecutionStrategy<PrincipalActionContext> { public Serializable execute(final PrincipalActionContext inActionContext) throws ExecutionException { final List<StreamFilter> filters = bookmarkTransformer.transform(getUserBookmarksMapper.execute(inActionContext .getPrincipal().getId())); return (Serializable) filters; } GetCurrentUsersBookmarksExecution(final DomainMapper<Long, List<StreamScope>> inGetUserBookmarksMapper,
            final Transformer<List<StreamScope>, List<StreamFilter>> inBookmarkTransformer); Serializable execute(final PrincipalActionContext inActionContext); }
GetCurrentUsersBookmarksExecution implements ExecutionStrategy<PrincipalActionContext> { public Serializable execute(final PrincipalActionContext inActionContext) throws ExecutionException { final List<StreamFilter> filters = bookmarkTransformer.transform(getUserBookmarksMapper.execute(inActionContext .getPrincipal().getId())); return (Serializable) filters; } GetCurrentUsersBookmarksExecution(final DomainMapper<Long, List<StreamScope>> inGetUserBookmarksMapper,
            final Transformer<List<StreamScope>, List<StreamFilter>> inBookmarkTransformer); Serializable execute(final PrincipalActionContext inActionContext);  }