@Test public void testExecute() { SingleListValueCacheMapper sut = new SingleListValueCacheMapper<String, String>("PREFIX:", keySuffixTransformer); sut.setCache(cache); final List<String> result = new ArrayList<String>(); context.checking(new Expectations() { { oneOf(keySuffixTransformer).transform("SUFFIX"); will(returnValue("FOO")); oneOf(cache).getList("PREFIX:FOO"); will(returnValue(result)); } }); assertSame(result, sut.execute("SUFFIX")); context.assertIsSatisfied(); }
public List<CachedValueType> execute(final KeySuffixType inKeySuffix) { String cacheKey = cacheKeyPrefix + keySuffixTransformer.transform(inKeySuffix); log.trace("Looking for cache key: " + cacheKey + " from " + inKeySuffix); return (List<CachedValueType>) getCache().getList(cacheKey); }
SingleListValueCacheMapper extends CachedDomainMapper implements
        DomainMapper<KeySuffixType, List<CachedValueType>> { public List<CachedValueType> execute(final KeySuffixType inKeySuffix) { String cacheKey = cacheKeyPrefix + keySuffixTransformer.transform(inKeySuffix); log.trace("Looking for cache key: " + cacheKey + " from " + inKeySuffix); return (List<CachedValueType>) getCache().getList(cacheKey); } }
SingleListValueCacheMapper extends CachedDomainMapper implements
        DomainMapper<KeySuffixType, List<CachedValueType>> { public List<CachedValueType> execute(final KeySuffixType inKeySuffix) { String cacheKey = cacheKeyPrefix + keySuffixTransformer.transform(inKeySuffix); log.trace("Looking for cache key: " + cacheKey + " from " + inKeySuffix); return (List<CachedValueType>) getCache().getList(cacheKey); } SingleListValueCacheMapper(final String inCacheKeyPrefix,
            final CacheKeySuffixTransformer<KeySuffixType> inKeySuffixTransformer); }
SingleListValueCacheMapper extends CachedDomainMapper implements
        DomainMapper<KeySuffixType, List<CachedValueType>> { public List<CachedValueType> execute(final KeySuffixType inKeySuffix) { String cacheKey = cacheKeyPrefix + keySuffixTransformer.transform(inKeySuffix); log.trace("Looking for cache key: " + cacheKey + " from " + inKeySuffix); return (List<CachedValueType>) getCache().getList(cacheKey); } SingleListValueCacheMapper(final String inCacheKeyPrefix,
            final CacheKeySuffixTransformer<KeySuffixType> inKeySuffixTransformer); List<CachedValueType> execute(final KeySuffixType inKeySuffix); }
SingleListValueCacheMapper extends CachedDomainMapper implements
        DomainMapper<KeySuffixType, List<CachedValueType>> { public List<CachedValueType> execute(final KeySuffixType inKeySuffix) { String cacheKey = cacheKeyPrefix + keySuffixTransformer.transform(inKeySuffix); log.trace("Looking for cache key: " + cacheKey + " from " + inKeySuffix); return (List<CachedValueType>) getCache().getList(cacheKey); } SingleListValueCacheMapper(final String inCacheKeyPrefix,
            final CacheKeySuffixTransformer<KeySuffixType> inKeySuffixTransformer); List<CachedValueType> execute(final KeySuffixType inKeySuffix);  }