@Override
    public void close() {
        if (connection != null) {
            try {
                connection.disconnect();
            } finally {
                connection = null;
            }
        }
    }
@Test
    public void testClose() {
        HttpResourceConnection instance = new HttpResourceConnection(getSettings());
        instance.close();
        assertTrue(instance.isClosed());
    }