### Question:
HDUtils { static byte[] longTo4ByteArray(long n) { byte[] bytes = Arrays.copyOfRange(ByteBuffer.allocate(8).putLong(n).array(), 4, 8); assert bytes.length == 4 : bytes.length; return bytes; } private  HDUtils(); static byte[] hmacSha512(byte[] key, byte[] data);  }### Answer:
@Test public void testLongToByteArray() throws Exception { byte[] bytes = HDUtils.longTo4ByteArray(1026); Assert.assertEquals("00000402", new String(Hex.encode(bytes))); }