@Test
public void testFailsDecodeGzipedBodyWithoutContentEncoding() throws Exception {

    byte[] gzippedBody = compress("test");
    Operation op = Operation
            .createGet(null)
            .setContentLength(gzippedBody.length)
            .addResponseHeader(Operation.CONTENT_TYPE_HEADER, Operation.MEDIA_TYPE_TEXT_PLAIN);
    try {
        Utils.decodeBody(op, ByteBuffer.wrap(gzippedBody), false);
        throw new IllegalStateException("should have failed");
    } catch (MalformedInputException e) {
    }
}