### Question:
Util { public static void adjustDESParity (byte[] bytes) { for (int i = 0; i < bytes.length; i++) { int b = bytes[i]; bytes[i] = (byte)(b & 0xfe | (b >> 1 ^ b >> 2 ^ b >> 3 ^ b >> 4 ^ b >> 5 ^ b >> 6 ^ b >> 7 ^ 0x01) & 0x01); } }  static void adjustDESParity(byte[] bytes); static boolean isDESParityAdjusted(byte[] bytes);  }### Answer:
@Test public void testAdjustDESParity() throws Throwable { byte[] bytes = new byte[1]; Util.adjustDESParity(bytes); assertEquals((byte) 1, bytes[0], "bytes[0]"); }
@Test public void testAdjustDESParity1() throws Throwable { byte[] bytes = new byte[0]; Util.adjustDESParity(bytes); assertEquals(0, bytes.length, "bytes.length"); }
@Test public void testAdjustDESParityThrowsNullPointerException() throws Throwable { try { Util.adjustDESParity(null); fail("Expected NullPointerException to be thrown"); } catch (NullPointerException ex) { if (isJavaVersionAtMost(JAVA_14)) { assertNull(ex.getMessage(), "ex.getMessage()"); } else { assertEquals("Cannot read the array length because \"bytes\" is null", ex.getMessage(), "ex.getMessage()"); } } }