// Path: ohc-core/src/main/java/org/caffinitas/ohc/HashAlgorithm.java
// public enum HashAlgorithm
// {
//     MURMUR3,
// 
//     CRC32,
// 
//     CRC32C,
// 
//     XX
// }


import org.caffinitas.ohc.HashAlgorithm;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.Test;
import java.nio.ByteBuffer;
import static org.testng.Assert.*;
            assertEquals(Uns.getInt(adr, Util.ENTRY_OFF_VALUE_LENGTH), 10L);

            assertEquals(HashEntries.getHash(adr), 0x98765432abcddeafL);
            assertEquals(HashEntries.getKeyLen(adr), 5L);
            assertEquals(HashEntries.getValueLen(adr), 10L);
            assertTrue(HashEntries.dereference(adr));
            ok = true;
        }
        finally
        {
            if (!ok)
                Uns.free(adr);
        }
    }

    @Test
    public void testCompareKey() throws Exception
    {
        long adr = Uns.allocate(MIN_ALLOC_LEN);
        KeyBuffer key = new KeyBuffer(11);
        try
        {
            HashEntries.init(0L, 11, 0, adr, Util.SENTINEL_NOT_PRESENT, 0L);

            ByteBuffer keyBuffer = key.byteBuffer();
            keyBuffer.putInt(0x98765432);
            keyBuffer.putInt(0xabcdabba);
            keyBuffer.put((byte)(0x44 & 0xff));
            keyBuffer.put((byte)(0x55 & 0xff));
            keyBuffer.put((byte)(0x88 & 0xff));
// Path: ohc-core/src/main/java/org/caffinitas/ohc/HashAlgorithm.java
// public enum HashAlgorithm
// {
//     MURMUR3,
// 
//     CRC32,
// 
//     CRC32C,
// 
//     XX
// }


// Path: ohc-core/src/test/java/org/caffinitas/ohc/linked/HashEntriesTest.java
import org.caffinitas.ohc.HashAlgorithm;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.Test;
import java.nio.ByteBuffer;
import static org.testng.Assert.*;

            assertEquals(Uns.getInt(adr, Util.ENTRY_OFF_VALUE_LENGTH), 10L);

            assertEquals(HashEntries.getHash(adr), 0x98765432abcddeafL);
            assertEquals(HashEntries.getKeyLen(adr), 5L);
            assertEquals(HashEntries.getValueLen(adr), 10L);
            assertTrue(HashEntries.dereference(adr));
            ok = true;
        }
        finally
        {
            if (!ok)
                Uns.free(adr);
        }
    }

    @Test
    public void testCompareKey() throws Exception
    {
        long adr = Uns.allocate(MIN_ALLOC_LEN);
        KeyBuffer key = new KeyBuffer(11);
        try
        {
            HashEntries.init(0L, 11, 0, adr, Util.SENTINEL_NOT_PRESENT, 0L);

            ByteBuffer keyBuffer = key.byteBuffer();
            keyBuffer.putInt(0x98765432);
            keyBuffer.putInt(0xabcdabba);
            keyBuffer.put((byte)(0x44 & 0xff));
            keyBuffer.put((byte)(0x55 & 0xff));
            keyBuffer.put((byte)(0x88 & 0xff));
            key.finish(Hasher.create(HashAlgorithm.MURMUR3));