}
public void testMakeSerializableIfNecessaryWhenSerializableIsRequiredAndSerializableFactoryIsNotNullAndEntryIsNotSerializable() {
MockControl factoryControl = MockControl
.createControl(SerializableFactory.class);
SerializableFactory factory = (SerializableFactory) factoryControl
.getMock();
cacheProviderFacade.setSerializableFactory(factory);
cacheProviderFacadeControl.expectAndReturn(cacheProviderFacade
.isSerializableCacheElementRequired(), true);
cacheProviderFacadeControl.replay();
Serializable expected = "Leia";
Object objectToStore = new Object();
factoryControl.expectAndReturn(factory
.makeSerializableIfNecessary(objectToStore), expected);
factoryControl.replay();
Object actual = cacheProviderFacade
.makeSerializableIfNecessary(objectToStore);