### Question:
ByteUtil { public static byte[] crc16Modbus(byte... datas) { int CRC = 0x0000ffff; int POLYNOMIAL = 0x0000a001; int i, j; for (i = 0; i < datas.length; i++) { CRC ^= ((int) datas[i] & 0x000000ff); for (j = 0; j < 8; j++) { if ((CRC & 0x00000001) != 0) { CRC >>= 1; CRC ^= POLYNOMIAL; } else { CRC >>= 1; } } } return new byte[]{(byte) ((CRC >> 8) & 0xFF), (byte) (CRC & 0xFF)}; }  static byte[] int2BytesBigEndian(int i); static int bytes2IntBigEndian(byte... bytes); static byte[] long2BytesBigEndian(long l); static long bytes2LongBigEndian(byte... bytes); static byte[] int2BytesLittleEndian(int i); static int bytes2IntLittleEndian(byte... bytes); static byte[] long2BytesLittleEndian(long l); static long bytes2LongLittleEndian(byte... bytes); static byte[] reverse(byte... bytes); static int bytesIndexOf(byte[] source, byte[] target, int begin); static byte bbc(byte... datas); static byte[] crc16Modbus(byte... datas);  }### Answer:
@Test public void crc16() { assertArrayEquals(new byte[]{(byte) 0xf5, (byte) 0xf4}, ByteUtil.crc16Modbus(TextUtil.hex2Bytes("00 64 FF FF 62 25 00 15 01 00 02 15 01 03 00 FF 00 00 00 00 00 00 00 12 00 BB B6 D3 AD B9 E2 C1 D9 C7 EB C8 EB B3 A1 CD A3 B3 B5"))); }