@Test public void testExecute() { context.checking(new Expectations() { { oneOf(mapper).execute(with(new EasyMatcher<Set<String>>() { @Override protected boolean isMatch(final Set<String> inTestObject) { return inTestObject.size() == 1 && inTestObject.contains("Pref:9"); } })); will(returnValue(Boolean.TRUE)); } }); PrefixingCacheKeyAdaptor sut = new PrefixingCacheKeyAdaptor("Pref:", mapper); sut.execute(9L); context.assertIsSatisfied(); }
@Override public Boolean execute(final Object inRequest) { return wrappedMapper.execute(Collections.singleton(prefix + inRequest)); }
PrefixingCacheKeyAdaptor implements DomainMapper<Object, Boolean> { @Override public Boolean execute(final Object inRequest) { return wrappedMapper.execute(Collections.singleton(prefix + inRequest)); } }
PrefixingCacheKeyAdaptor implements DomainMapper<Object, Boolean> { @Override public Boolean execute(final Object inRequest) { return wrappedMapper.execute(Collections.singleton(prefix + inRequest)); } PrefixingCacheKeyAdaptor(final String inPrefix, final DomainMapper<Set<String>, Boolean> inWrappedMapper); }
PrefixingCacheKeyAdaptor implements DomainMapper<Object, Boolean> { @Override public Boolean execute(final Object inRequest) { return wrappedMapper.execute(Collections.singleton(prefix + inRequest)); } PrefixingCacheKeyAdaptor(final String inPrefix, final DomainMapper<Set<String>, Boolean> inWrappedMapper); @Override Boolean execute(final Object inRequest); }
PrefixingCacheKeyAdaptor implements DomainMapper<Object, Boolean> { @Override public Boolean execute(final Object inRequest) { return wrappedMapper.execute(Collections.singleton(prefix + inRequest)); } PrefixingCacheKeyAdaptor(final String inPrefix, final DomainMapper<Set<String>, Boolean> inWrappedMapper); @Override Boolean execute(final Object inRequest);  }