### Question:
IdUtils { public static byte[] toBytes(final UUID id) { if (id == null) { return null; } final byte[] buffer = new byte[16]; final ByteBuffer bb = ByteBuffer.wrap(buffer); bb.putLong(id.getMostSignificantBits()); bb.putLong(id.getLeastSignificantBits()); return buffer; } IdUtils(); static UUID create(); static UUID tryParse(final String str); static byte[] toBytes(final UUID id); static UUID fromBytes(final byte[] b);  }### Answer:
@Test public void testToBytesNull() { assertNull(IdUtils.toBytes(null)); }
@Test public void testToBytes() { final UUID id = IdUtils.create(); final byte[] b1 = IdUtils.toBytes(id); final byte[] b2 = IdUtils.toBytes(id); assertNotNull(b1); assertEquals(16, b1.length); assertArrayEquals(b1, b2); }