assertEquals("Should fail because incorrect response code was sent",
"206 expected, but received 200", e.getMessage());
}
r.responseCode = 206;
is.seek(0);
try {
is.read();
fail("Exception should be thrown when 206 response is given "
+ "but 200 is expected");