@Override
    public void close() throws IOException {
        super.close();
        try {
            final Reply response = this.getStatus();
            if(response != null) {
                if(log.isDebugEnabled()) {
                    log.debug(String.format("Closed stream %s with response value %s", this, response));
                }
                status.withResponse(attributes.toAttributes(response)).setComplete();
            }
        }
        catch(BackgroundException e) {
            throw new IOException(e.getDetail(), e);
        }
    }
@Test(expected = IOException.class)
    public void testClose() throws Exception {
        try {
            new HttpResponseOutputStream<Void>(NullOutputStream.NULL_OUTPUT_STREAM, new VoidAttributesAdapter(), new TransferStatus()) {
                @Override
                public Void getStatus() throws BackgroundException {
                    throw new InteroperabilityException("d");
                }
            }.close();
        }
        catch(IOException e) {
            assertEquals("d. Please contact your web hosting service provider for assistance.", e.getMessage());
            throw e;
        }
    }