@Test
public void testCorrectValues() throws Exception {

  byte[] bytes = "Now is the time for all good men to come to the aid of their country".getBytes("UTF-8");
  int hash = 0;
  for (int i = 0; i < bytes.length; i++) {
    hash = hash * 31 + (bytes[i] & 0xff);
    bytes[i] = (byte) hash;
  }
  // test different offsets.
  for (int offset = 0; offset < 10; offset++) {
    byte[] arr = new byte[bytes.length + offset];
    System.arraycopy(bytes, 0, arr, offset, bytes.length);
    for (int len = 0; len < bytes.length; len++) {
      int h = MurmurHash3.murmurhash3x8632(arr, offset, len, len);
      assertEquals(ANSWERS[len], h);
    }
  }
}