factoryBean.setObjectSizer(mockObjectSizer);
factoryBean.setThreshold(null);
factoryBean.setType(EvictionType.MEMORY_SIZE);
factoryBean.afterPropertiesSet();
EvictionAttributes evictionAttributes = factoryBean.getObject();
assertNotNull(evictionAttributes);
assertEquals(EvictionAction.DEFAULT_EVICTION_ACTION, evictionAttributes.getAction());
assertSame(mockObjectSizer, evictionAttributes.getObjectSizer());
assertEquals(EvictionAttributesFactoryBean.DEFAULT_MEMORY_MAXIMUM_SIZE, evictionAttributes.getMaximum());
assertEquals(EvictionAlgorithm.LRU_MEMORY, evictionAttributes.getAlgorithm());
}