public boolean isClosed() {
        return connection == null;
    }
@Test
    public void testIsClosed() throws Exception {
        HttpResourceConnection resource = null;
        try {
            URL url = new URL(getSettings().getString(Settings.KEYS.ENGINE_VERSION_CHECK_URL));
            resource = new HttpResourceConnection(getSettings());
            resource.fetch(url);
            assertFalse(resource.isClosed());
        } finally {
            if (resource != null) {
                resource.close();
                assertTrue(resource.isClosed());
            }
        }
    }