@Test public void testExecuteUnknown() { context.checking(new Expectations() { { allowing(dao).execute(9L); will(returnValue(null)); } }); String result = sut.execute(9L); context.assertIsSatisfied(); assertNull(result); }
@Override public String execute(final Long inRequest) { Identifiable item = dao.execute(inRequest); return (item != null) ? item.getUniqueId() : null; }
UniqueIdFromIdMapper implements DomainMapper<Long, String> { @Override public String execute(final Long inRequest) { Identifiable item = dao.execute(inRequest); return (item != null) ? item.getUniqueId() : null; } }
UniqueIdFromIdMapper implements DomainMapper<Long, String> { @Override public String execute(final Long inRequest) { Identifiable item = dao.execute(inRequest); return (item != null) ? item.getUniqueId() : null; } UniqueIdFromIdMapper(final DomainMapper<Long, Identifiable> inDao); }
UniqueIdFromIdMapper implements DomainMapper<Long, String> { @Override public String execute(final Long inRequest) { Identifiable item = dao.execute(inRequest); return (item != null) ? item.getUniqueId() : null; } UniqueIdFromIdMapper(final DomainMapper<Long, Identifiable> inDao); @Override String execute(final Long inRequest); }
UniqueIdFromIdMapper implements DomainMapper<Long, String> { @Override public String execute(final Long inRequest) { Identifiable item = dao.execute(inRequest); return (item != null) ? item.getUniqueId() : null; } UniqueIdFromIdMapper(final DomainMapper<Long, Identifiable> inDao); @Override String execute(final Long inRequest);  }