@Test
public void testGetNonExistent() throws Exception {
random = new Random(1002);
VectorMapJoinFastMultiKeyHashMap map =
new VectorMapJoinFastMultiKeyHashMap(
false,CAPACITY, LOAD_FACTOR, WB_SIZE, -1);
VerifyFastBytesHashMap verifyTable = new VerifyFastBytesHashMap();
byte[] key1 = new byte[random.nextInt(MAX_KEY_LENGTH)];
random.nextBytes(key1);
byte[] value = new byte[random.nextInt(MAX_VALUE_LENGTH)];
random.nextBytes(value);
map.testPutRow(key1, value);
verifyTable.add(key1, value);
verifyTable.verify(map);
byte[] key2 = new byte[random.nextInt(MAX_KEY_LENGTH)];
random.nextBytes(key2);
VectorMapJoinHashMapResult hashMapResult = map.createHashMapResult();
JoinUtil.JoinResult joinResult = map.lookup(key2, 0, key2.length, hashMapResult);
assertTrue(joinResult == JoinUtil.JoinResult.NOMATCH);
assertTrue(!hashMapResult.hasRows());
map.testPutRow(key2, value);
verifyTable.add(key2, value);
verifyTable.verify(map);
byte[] key3 = new byte[random.nextInt(MAX_KEY_LENGTH)];
random.nextBytes(key3);
hashMapResult = map.createHashMapResult();
joinResult = map.lookup(key3, 0, key3.length, hashMapResult);
assertTrue(joinResult == JoinUtil.JoinResult.NOMATCH);
assertTrue(!hashMapResult.hasRows());
}