### Question:
SevenZUtil { public static byte[] compress(byte[] bytes) { if (bytes == null) { throw new NullPointerException("bytes is null"); } SeekableInMemoryByteChannel channel = new SeekableInMemoryByteChannel(); try (SevenZOutputFile z7z = new SevenZOutputFile(channel)) { SevenZArchiveEntry entry = new SevenZArchiveEntry(); entry.setName("sevenZip"); entry.setSize(bytes.length); z7z.putArchiveEntry(entry); z7z.write(bytes); z7z.closeArchiveEntry(); z7z.finish(); return channel.array(); } catch (IOException e) { throw new RuntimeException("SevenZ compress error", e); } }  static byte[] compress(byte[] bytes); static byte[] decompress(byte[] bytes);  }### Answer:
@Test public void test_compress() { Assertions.assertThrows(NullPointerException.class, () -> { SevenZUtil.compress(null); }); }