@Test public void testExecute() { GetItemsByPointerIdsMapper sut = new GetItemsByPointerIdsMapper(pointersToIdMapper, itemsByIdMapper); final List<String> pointerList = new ArrayList<String>(); final List<Long> ids = context.mock(List.class); final List<String> results = new ArrayList<String>(); context.checking(new Expectations() { { oneOf(pointersToIdMapper).execute(pointerList); will(returnValue(ids)); oneOf(itemsByIdMapper).execute(ids); will(returnValue(results)); } }); assertSame(results, sut.execute(pointerList)); context.assertIsSatisfied(); }
@Override public List<ValueType> execute(final List<PointerType> inPointerIds) { List<Long> pointersToIds = pointersToIdMapper.execute(inPointerIds); return itemsByIdMapper.execute(pointersToIds); }
GetItemsByPointerIdsMapper implements
        DomainMapper<List<PointerType>, List<ValueType>> { @Override public List<ValueType> execute(final List<PointerType> inPointerIds) { List<Long> pointersToIds = pointersToIdMapper.execute(inPointerIds); return itemsByIdMapper.execute(pointersToIds); } }
GetItemsByPointerIdsMapper implements
        DomainMapper<List<PointerType>, List<ValueType>> { @Override public List<ValueType> execute(final List<PointerType> inPointerIds) { List<Long> pointersToIds = pointersToIdMapper.execute(inPointerIds); return itemsByIdMapper.execute(pointersToIds); } GetItemsByPointerIdsMapper(final DomainMapper<List<PointerType>, List<Long>> inPointersToIdMapper,
            final DomainMapper<List<Long>, List<ValueType>> inItemsByIdMapper); }
GetItemsByPointerIdsMapper implements
        DomainMapper<List<PointerType>, List<ValueType>> { @Override public List<ValueType> execute(final List<PointerType> inPointerIds) { List<Long> pointersToIds = pointersToIdMapper.execute(inPointerIds); return itemsByIdMapper.execute(pointersToIds); } GetItemsByPointerIdsMapper(final DomainMapper<List<PointerType>, List<Long>> inPointersToIdMapper,
            final DomainMapper<List<Long>, List<ValueType>> inItemsByIdMapper); @Override List<ValueType> execute(final List<PointerType> inPointerIds); }
GetItemsByPointerIdsMapper implements
        DomainMapper<List<PointerType>, List<ValueType>> { @Override public List<ValueType> execute(final List<PointerType> inPointerIds) { List<Long> pointersToIds = pointersToIdMapper.execute(inPointerIds); return itemsByIdMapper.execute(pointersToIds); } GetItemsByPointerIdsMapper(final DomainMapper<List<PointerType>, List<Long>> inPointersToIdMapper,
            final DomainMapper<List<Long>, List<ValueType>> inItemsByIdMapper); @Override List<ValueType> execute(final List<PointerType> inPointerIds);  }