### Question:
SnappyCompressor { public byte[] decompress(final byte[] compressed) { checkNotNull(compressed, "input data must not be null"); try { return Snappy.uncompress(compressed); } catch (final IOException e) { throw new FramingException("Snappy decompression failed", e); } }  byte[] compress(final byte[] uncompressed); byte[] decompress(final byte[] compressed); int uncompressedLength(final byte[] compressed);  }### Answer:
@Test public void decompressNull() { assertThatThrownBy(() -> snappy.decompress(null)).isInstanceOf(NullPointerException.class); }
@Test public void shouldRejectMessageWithNonZeroDeclaredLengthButNoCompressedData() { assertThatThrownBy(() -> snappy.decompress(Bytes.fromHexString("0xFFFFFF01").toArray())) .isInstanceOf(FramingException.class); }