public static byte[] longToByteArray(long longValue, int length) {
        return longToByteArray(longValue, length, true);
    }
@Test
    public void testLongToByteArray() {
        BeaconParser parser = new BeaconParser();
        byte[] bytes = parser.longToByteArray(10, 1);
        assertEquals("first byte should be 10", 10, bytes[0]);
    }