### Question:
Header { public static byte setCompressed(byte bits, boolean compressed) { return compressed ? bitOn(bits, COMPRESS_BIT) : bitOff(bits, COMPRESS_BIT); } private  Header(byte[] data, int offset); static Header create(String keyName, boolean compressed, boolean withHMAC); static Header create(byte[] data, int offset); static byte setCompressed(byte bits, boolean compressed); static byte setHaveHMAC(byte bits, boolean haveHMAC); int size(); boolean isCompressed(); boolean haveHMAC(); byte getFlags(); void store(byte[] output, int outputOffset, byte flags); String getKeyName();  }### Answer:
@Test public void testSetCompressed() { assertEquals(1, Header.setCompressed((byte) 0, true)); assertEquals(0, Header.setCompressed((byte) 0, false)); assertEquals(1, Header.setCompressed((byte) 1, true)); assertEquals(0, Header.setCompressed((byte) 1, false)); assertEquals(2, Header.setHaveHMAC((byte) 0, true)); assertEquals(0, Header.setHaveHMAC((byte) 0, false)); assertEquals(3, Header.setHaveHMAC((byte) 3, true)); assertEquals(0, Header.setHaveHMAC((byte) 2, false)); }