### Question:
Utils { public static long bytesToLong(final byte[] bytes) { return (bytes[0] & 0xFFL) << 56 | (bytes[1] & 0xFFL) << 48 | (bytes[2] & 0xFFL) << 40 | (bytes[3] & 0xFFL) << 32 | (bytes[4] & 0xFFL) << 24 | (bytes[5] & 0xFFL) << 16 | (bytes[6] & 0xFFL) << 8 | (bytes[7] & 0xFFL) << 0; }  static Random random(); static String ASCIIString(int length); static long hash(long val); static int FNVhash32(int val); static long FNVhash64(long val); static long bytesToLong(final byte[] bytes); static byte[] longToBytes(final long val); static double bytesToDouble(final byte[] bytes); static byte[] doubleToBytes(final double val); static int getActiveThreadCount(); static long getUsedMemoryBytes(); static int getUsedMemoryMegaBytes(); static double getSystemLoadAverage(); static long getGCTotalCollectionCount(); static long getGCTotalTime(); static Map<String, Long[]> getGCStatst(); static final int FNV_offset_basis_32; static final int FNV_prime_32; static final long FNV_offset_basis_64; static final long FNV_prime_64; }### Answer:
@Test (expectedExceptions = NullPointerException.class) public void bytesToLongNull() throws Exception { Utils.bytesToLong(null); }
@Test (expectedExceptions = IndexOutOfBoundsException.class) public void bytesToLongTooShort() throws Exception { Utils.bytesToLong(new byte[] { 0, 0, 0, 0, 0, 0, 0 }); }