@Test
public void computeByteHash() throws UnsupportedEncodingException {

    CommandLineArgumentParser.parseFromProperties(this);
    Set<String> keys = new HashSet<>(this.iterationCount);
    Set<Long> hashedKeys = new HashSet<>(this.iterationCount);
    long collisionCount = 0;
    for (int i = 0; i < this.iterationCount; i++) {
        String k = "-string-" + i;
        byte[] bytes = k.getBytes(Utils.CHARSET);
        String stringHash = computeHash(bytes, 0, bytes.length);
        String stringHash2 = computeHash(bytes, 0, bytes.length);
        assertEquals(stringHash, stringHash2);
        assertTrue(keys.add(k));
    }
    Logger.getAnonymousLogger().info("Generated keys: " + keys.size());
    long s = System.nanoTime() / 1000;
    for (String key : keys) {
        byte[] bytes = key.getBytes(Utils.CHARSET);
        long hash = FNVHash.compute(bytes, 0, bytes.length);
        assertTrue(hash != 0);
        if (!hashedKeys.add(hash)) {
            collisionCount++;
        }
    }
    long e = System.nanoTime() / 1000;
    double thpt = this.iterationCount / ((e - s) / 1000000.0);
    Logger.getAnonymousLogger().info("Throughput: " + thpt);
    Logger.getAnonymousLogger().info("Collisions: " + collisionCount);
}