pool.put(1, new WithCustomResolution(1, 1));
pool.put(2, new WithCustomResolution(2, 2));
pool.put(3, new WithCustomResolution(3, 3));
pool.put(4, new WithCustomResolution(4, 4));
pool.put(5, new WithCustomResolution(5, 5));
ContextAttributes attrs = mapper.getDeserializationConfig().getAttributes().withSharedAttribute(POOL_KEY, pool);
String content = "{\"data\":[1,2,3,4,5]}";
CustomResolutionWrapper wrapper = mapper.reader(CustomResolutionWrapper.class).with(attrs).readValue(content);
assertFalse(wrapper.data.isEmpty());
for (WithCustomResolution ob : wrapper.data) {
assertSame(pool.get(ob.id), ob);