@Test public void test() { context.checking(new Expectations() { { oneOf(request).getUserId(); will(returnValue(userId)); oneOf(request).getGroupStreamIds(); will(returnValue(groupStreamIds)); oneOf(getFollowedPeopleActivityIdsMapper).execute(userId); will(returnValue(new ArrayList<Long>())); oneOf(getFollowedGroupActivityIdsMapper).execute(groupStreamIds); will(returnValue(new ArrayList<List<Long>>())); } }); sut.execute(request); context.assertIsSatisfied(); }
@Override public List<List<Long>> execute(final GetAllFollowedByActivityIdsRequest inRequest) { List<List<Long>> results = new ArrayList<List<Long>>(); results.add(getFollowedPeopleActivityIdsMapper.execute(inRequest.getUserId())); results.addAll(getFollowedGroupActivityIdsMapper.execute(inRequest.getGroupStreamIds())); return results; }
GetAllFollowedByActivityIdsMapper implements
        DomainMapper<GetAllFollowedByActivityIdsRequest, List<List<Long>>> { @Override public List<List<Long>> execute(final GetAllFollowedByActivityIdsRequest inRequest) { List<List<Long>> results = new ArrayList<List<Long>>(); results.add(getFollowedPeopleActivityIdsMapper.execute(inRequest.getUserId())); results.addAll(getFollowedGroupActivityIdsMapper.execute(inRequest.getGroupStreamIds())); return results; } }
GetAllFollowedByActivityIdsMapper implements
        DomainMapper<GetAllFollowedByActivityIdsRequest, List<List<Long>>> { @Override public List<List<Long>> execute(final GetAllFollowedByActivityIdsRequest inRequest) { List<List<Long>> results = new ArrayList<List<Long>>(); results.add(getFollowedPeopleActivityIdsMapper.execute(inRequest.getUserId())); results.addAll(getFollowedGroupActivityIdsMapper.execute(inRequest.getGroupStreamIds())); return results; } GetAllFollowedByActivityIdsMapper(final DomainMapper<Long, List<Long>> inGetFollowedPeopleActivityIdsMapper,
            final DomainMapper<List<Long>, List<List<Long>>> inGetFollowedGroupActivityIdsMapper); }
GetAllFollowedByActivityIdsMapper implements
        DomainMapper<GetAllFollowedByActivityIdsRequest, List<List<Long>>> { @Override public List<List<Long>> execute(final GetAllFollowedByActivityIdsRequest inRequest) { List<List<Long>> results = new ArrayList<List<Long>>(); results.add(getFollowedPeopleActivityIdsMapper.execute(inRequest.getUserId())); results.addAll(getFollowedGroupActivityIdsMapper.execute(inRequest.getGroupStreamIds())); return results; } GetAllFollowedByActivityIdsMapper(final DomainMapper<Long, List<Long>> inGetFollowedPeopleActivityIdsMapper,
            final DomainMapper<List<Long>, List<List<Long>>> inGetFollowedGroupActivityIdsMapper); @Override List<List<Long>> execute(final GetAllFollowedByActivityIdsRequest inRequest); }
GetAllFollowedByActivityIdsMapper implements
        DomainMapper<GetAllFollowedByActivityIdsRequest, List<List<Long>>> { @Override public List<List<Long>> execute(final GetAllFollowedByActivityIdsRequest inRequest) { List<List<Long>> results = new ArrayList<List<Long>>(); results.add(getFollowedPeopleActivityIdsMapper.execute(inRequest.getUserId())); results.addAll(getFollowedGroupActivityIdsMapper.execute(inRequest.getGroupStreamIds())); return results; } GetAllFollowedByActivityIdsMapper(final DomainMapper<Long, List<Long>> inGetFollowedPeopleActivityIdsMapper,
            final DomainMapper<List<Long>, List<List<Long>>> inGetFollowedGroupActivityIdsMapper); @Override List<List<Long>> execute(final GetAllFollowedByActivityIdsRequest inRequest);  }