@Override
    public V get(HollowMap<K, V> map, int ordinal, Object key) {
        if(getSchema().getHashKey() != null) {
            for(int i=0;i<ordinals.length;i+=2) {
                if(ordinals[i] != -1 && map.equalsKey(ordinals[i], key))
                    return map.instantiateValue(ordinals[i+1]);
            }
        } else {
            int hashCode = dataAccess.getDataAccess().getHashCodeFinder().hashCode(key);
            int bucket = (HashCodes.hashInt(hashCode) & hashMask) * 2;
    
            while(ordinals[bucket] != -1) {
                if(map.equalsKey(ordinals[bucket], key)) {
                    return map.instantiateValue(ordinals[bucket + 1]);
                }
    
                bucket += 2;
                bucket &= ordinals.length - 1;
            }
        }

        return null;
    }
@Test
    public void testGetOnEmptyMap() throws Exception {
        addRecord();
        addRecord(10, 20);

        roundTripSnapshot();

        HollowMapCachedDelegate<Integer, Integer> delegate = new HollowMapCachedDelegate<Integer, Integer>((HollowMapTypeReadState)readStateEngine.getTypeState("TestMap"), 0);
        HollowMap<Integer, Integer> map = new HollowMap<Integer, Integer>(delegate, 0) {
            public Integer instantiateKey(int keyOrdinal) {
                return keyOrdinal;
            }
            public Integer instantiateValue(int valueOrdinal) {
                return valueOrdinal;
            }
            public boolean equalsKey(int keyOrdinal, Object testObject) {
                return keyOrdinal == (Integer)testObject;
            }
            public boolean equalsValue(int valueOrdinal, Object testObject) {
                return valueOrdinal == (Integer)testObject;
            }

        };

        Assert.assertNull(delegate.get(map, 0, 10));
    }