@Test public void testExecute() { DomainMapper<String, String> sut = new GetItemByPointerIdMapper(pointerToIdMapper, itemByIdMapper); final String pointerValue = "The Pointer"; final Long idValue = 400L; final String result = "The Result"; context.checking(new Expectations() { { oneOf(pointerToIdMapper).execute(pointerValue); will(returnValue(idValue)); oneOf(itemByIdMapper).execute(idValue); will(returnValue(result)); } }); assertEquals(result, sut.execute(pointerValue)); context.assertIsSatisfied(); }
@Override public ValueType execute(final PointerType inPointerId) { Long id = pointerToIdMapper.execute(inPointerId); return itemByIdMapper.execute(id); }
GetItemByPointerIdMapper implements DomainMapper<PointerType, ValueType> { @Override public ValueType execute(final PointerType inPointerId) { Long id = pointerToIdMapper.execute(inPointerId); return itemByIdMapper.execute(id); } }
GetItemByPointerIdMapper implements DomainMapper<PointerType, ValueType> { @Override public ValueType execute(final PointerType inPointerId) { Long id = pointerToIdMapper.execute(inPointerId); return itemByIdMapper.execute(id); } GetItemByPointerIdMapper(final DomainMapper<PointerType, Long> inPointerToIdMapper,
            final DomainMapper<Long, ValueType> inItemByIdMapper); }
GetItemByPointerIdMapper implements DomainMapper<PointerType, ValueType> { @Override public ValueType execute(final PointerType inPointerId) { Long id = pointerToIdMapper.execute(inPointerId); return itemByIdMapper.execute(id); } GetItemByPointerIdMapper(final DomainMapper<PointerType, Long> inPointerToIdMapper,
            final DomainMapper<Long, ValueType> inItemByIdMapper); @Override ValueType execute(final PointerType inPointerId); }
GetItemByPointerIdMapper implements DomainMapper<PointerType, ValueType> { @Override public ValueType execute(final PointerType inPointerId) { Long id = pointerToIdMapper.execute(inPointerId); return itemByIdMapper.execute(id); } GetItemByPointerIdMapper(final DomainMapper<PointerType, Long> inPointerToIdMapper,
            final DomainMapper<Long, ValueType> inItemByIdMapper); @Override ValueType execute(final PointerType inPointerId);  }