@Test
public void short2bytes() {

    short i = 0;
    byte[] bs = CodecUtils.short2bytes(i);
    Assert.assertArrayEquals(bs, new byte[] { 0, 0 });
    i = 1000;
    bs = CodecUtils.short2bytes(i);
    Assert.assertArrayEquals(bs, new byte[] { 3, -24 });
    short s = 258; // =1*256+2
    bs = CodecUtils.short2bytes(s);
    Assert.assertEquals(bs[0], 1);
    Assert.assertEquals(bs[1], 2);
}