}
public void testAcquireAndGet(SharedHashMap<CharSequence, LongValue> map, int entries)
throws IOException, ClassNotFoundException, IllegalAccessException,
InstantiationException {
LongValue value = new LongValue$$Native();
LongValue value2 = new LongValue$$Native();
LongValue value3 = new LongValue$$Native();
for (int j = 1; j <= 3; j++) {
for (int i = 0; i < entries; i++) {
CharSequence userCS = getUserCharSequence(i);
if (j > 1) {
assertNotNull(map.getUsing(userCS, value));
} else {
map.acquireUsing(userCS, value);
}
assertEquals(j - 1, value.getValue());
value.addAtomicValue(1);
assertEquals(value2, map.acquireUsing(userCS, value2));
assertEquals(j, value2.getValue());
assertEquals(value3, map.getUsing(userCS, value3));
assertEquals(j, value3.getValue());
}
}
map.close();
}