}
}
public void testClosedCondition() throws Exception {
SessionOutputBufferMockup transmitter = new SessionOutputBufferMockup();
IdentityOutputStream outstream = new IdentityOutputStream(transmitter);
outstream.close();
outstream.close();
try {
byte[] tmp = new byte[2];
outstream.write(tmp, 0, tmp.length);
fail("IOException should have been thrown");
} catch (IOException e) {
//expected
}
try {
outstream.write('a');
fail("IOException should have been thrown");
} catch (IOException e) {
//expected
}
}