oos.close();
ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(bytes));
Object proxy2 = ois.readObject();
assertNotNull(proxy2);
assertTrue(proxy instanceof ConnectionFactory);
Connection connection = proxy.getConnection();
assertNotNull(connection);
kernel.stopGBean(managedConnectionFactoryName);
ObjectInputStream ois2 = new ObjectInputStream(new ByteArrayInputStream(bytes));
ConnectionFactory proxy3 = (ConnectionFactory) ois2.readObject();
try {