@Test
public void testToShort() {

    byte[] barr = {0x7e, (byte) 0xac, (byte) 0x8a, (byte) 0x93};
    short[] sarrBe = {0x7eac, (short) 0x8a93};
    short[] sarrLe = {(short) 0xac7e, (short) 0x938a};
    Assert.assertArrayEquals(Bytes.toShortArray(barr, barr.length, true), sarrBe);
    Assert.assertArrayEquals(Bytes.toShortArray(barr, barr.length, false), sarrLe);
}