useSerializedProxy((Pool)serializeWithXStreamAndPureReflection(pool));
assertNotNull(borrowed); // keep instance
}
public void testForcedSerializationWithUnserializableObject() throws IOException, ClassNotFoundException {
final Pool pool = new Pool(TestCase.class, new NoOperationResetter(), getFactory(), Pool.SERIALIZATION_FORCE);
pool.add(this);
final Pool serialized = (Pool)serializeWithJDK(pool);
assertEquals(0, serialized.size());
serialized.add(this);
assertEquals(1, serialized.size());