public void testMaxBuffer() throws Exception {
long txid = 101;
// set timeout to 5 seconds
HttpImageUploadChannel.setTimeoutForTesting(5);
// setting -1 will cause the first send operation to fail
HttpImageUploadChannel channel = new HttpImageUploadChannel(httpAddress,
journalId, FAKE_NSINFO, txid, 0, -1);
channel.start();
ByteArrayOutputStream bos = genBos();
channel.send(bos);
assertTrue(channel.isDisabled());
}