Assert.fail("IllegalArgumentException should have been thrown");
} catch (IllegalArgumentException ex) {
//expected
}
ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());
new SessionInputBufferMock(in, 10);
try {
new SessionInputBufferMock(in, -10);
Assert.fail("IllegalArgumentException should have been thrown");
} catch (IllegalArgumentException ex) {
//expected
}
try {
new SessionOutputBufferMock(out, -10);
Assert.fail("IllegalArgumentException should have been thrown");
} catch (IllegalArgumentException ex) {
//expected
}
try {
new SessionInputBufferMock((InputStream)null, 1024);
Assert.fail("IllegalArgumentException should have been thrown");
} catch (IllegalArgumentException ex) {
//expected
}
try {
new SessionInputBufferMock(in, 10, null);
Assert.fail("IllegalArgumentException should have been thrown");
} catch (IllegalArgumentException ex) {
//expected
}
}