}
public void testClose() throws Exception {
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
HttpDataTransmitterMockup datatransmitter = new HttpDataTransmitterMockup(buffer);
OutputStream out = new IdentityOutputStream(datatransmitter);
out.close();
out.close();
byte[] tmp = new byte[10];
try {
out.write(tmp);
fail("IOException should have been thrown");
} catch (IOException ex) {
// expected
}
try {
out.write(1);
fail("IOException should have been thrown");
} catch (IOException ex) {
// expected
}
}