### Question:
ConnectionCreatingPoolableObjectFactory implements PooledObjectFactory<IRODSMidLevelProtocol> { @Override public PooledObject<IRODSMidLevelProtocol> makeObject() throws Exception { log.info("makeObject returns a new iRODS connection"); return new DefaultPooledObject<IRODSMidLevelProtocol>( irodsProtocolManager.getIRODSProtocol(cachedIRODSAccount, pipelineConfiguration, irodsSession)); } ConnectionCreatingPoolableObjectFactory(final IRODSAccount cachedIRODSAccount,
			final IRODSSession irodsSession, final IRODSProtocolManager irodsProtocolManager); @Override void activateObject(PooledObject<IRODSMidLevelProtocol> objectToActivate); @Override void destroyObject(PooledObject<IRODSMidLevelProtocol> objectToDestroy); @Override PooledObject<IRODSMidLevelProtocol> makeObject(); @Override void passivateObject(PooledObject<IRODSMidLevelProtocol> objectToPassivate); @Override boolean validateObject(PooledObject<IRODSMidLevelProtocol> objectToValidate);  }### Answer:
@Test public void testMakeObject() throws Exception { IRODSAccount irodsAccount = testingPropertiesHelper.buildIRODSAccountFromTestProperties(testingProperties); ConnectionCreatingPoolableObjectFactory factory = new ConnectionCreatingPoolableObjectFactory(irodsAccount, irodsFileSystem.getIrodsSession(), irodsFileSystem.getIrodsProtocolManager()); PooledObject<IRODSMidLevelProtocol> conn = factory.makeObject(); Assert.assertNotNull("null connection returned", conn); factory.destroyObject(conn); IRODSMidLevelProtocol actual = conn.getObject(); Assert.assertFalse("command not disconnected after destroy", actual.isConnected()); }