I_Map i_map = this.currMap;
ME = "I_MapTest.testByteOverflow(" + i_map.getStorageId() + ")[" + i_map.getClass().getName() + "]";
System.out.println("***" + ME);
try {
StorageId storageId = new StorageId(glob, "msgUnitStore", "ByteOverflowMapId");
QueuePropertyBase prop = new MsgUnitStoreProperty(glob, "/node/test");
MsgUnitWrapper mu = new MsgUnitWrapper(glob, createMsgUnit(false, 0), storageId);
long sizeEmpty = mu.getSizeInBytes();
MsgUnitWrapper[] queueEntries = {
new MsgUnitWrapper(glob, createMsgUnit(false, 0), storageId),
new MsgUnitWrapper(glob, createMsgUnit(false, 0), storageId),
new MsgUnitWrapper(glob, createMsgUnit(false, 0), storageId),
// Each above entry has 3,311 bytes = 9,922, the next one has 9,932 bytes
// so when it is entered two of the above need to be swapped away
// as maxBytes=13,244
new MsgUnitWrapper(glob, createMsgUnit(false, 2*sizeEmpty-1), storageId),
new MsgUnitWrapper(glob, createMsgUnit(false, 0), storageId)};
final long maxBytesCache = 4*sizeEmpty;
prop.setMaxBytes(1000000);
prop.setMaxBytesCache(maxBytesCache);
assertEquals(ME+": Wrong capacity", 1000000, prop.getMaxBytes());
assertEquals(ME+": Wrong cache capacity", maxBytesCache, prop.getMaxBytesCache());
i_map.initialize(storageId, prop);
assertEquals(ME+": Wrong queue ID", storageId, i_map.getStorageId());
long numOfBytes = 0;
for(int i=0; i<queueEntries.length; i++) {