View Javadoc
1   package com.atlassian.cache.ehcache.wrapper;
2   
3   public class WrapperTestUtils {
4       public static ValueProcessor getValueProcessor() {
5           return new ValueProcessor() {
6               @SuppressWarnings("unchecked")
7               @Override
8               public Object wrap(final Object o) {
9                   return o != null ? new MockWrappedValue(o) : null;
10              }
11  
12              @SuppressWarnings("unchecked")
13              @Override
14              public Object unwrap(final Object o) {
15                  return o != null && o instanceof MockWrappedValue ? ((MockWrappedValue) o).getValue() : o;
16              }
17          };
18      }
19  }