Utils { public static int mergeBytes(final int high, final int low) { int h = Byte.toUnsignedInt((byte) high); int l = Byte.toUnsignedInt((byte) low); return (h << Byte.SIZE) | l; } private  Utils(); static byte[] concatByteArray(final byte[] a, final byte[] b); static int getBitRange(final int b, final int s, final int n); static int mergeBytes(final int high, final int low); static int setBitRange(final int val,
            final int start, final int len, final int newVal); static byte[] splitInteger(final int value); static String toHex(final byte[] data);  }
@Test public void testMergeBytes() { int high = Byte.MAX_VALUE * 2 + 1; int low = Byte.MAX_VALUE * 2 + 1; int expResult = Short.MAX_VALUE * 2 + 1; int result = Utils.mergeBytes(high, low); assertEquals(expResult, result); }