replace LinkedHashMap with a more memory efficient implementation
This saves approximately 50MB of heap space.
This commit is contained in:
26
pdb-utils/src/test/java/org/lucares/utils/MiniMapTest.java
Normal file
26
pdb-utils/src/test/java/org/lucares/utils/MiniMapTest.java
Normal file
@@ -0,0 +1,26 @@
|
||||
package org.lucares.utils;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.testng.Assert;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
@Test
|
||||
public class MiniMapTest {
|
||||
public void testInsertGet()
|
||||
{
|
||||
final MiniMap<String, String> map = new MiniMap<>();
|
||||
|
||||
String key1 = "key1";
|
||||
String key2 = "key2";
|
||||
String value1 = "value1";
|
||||
String value2 = "value1";
|
||||
|
||||
|
||||
map.put(key1, value1);
|
||||
map.put(key2, value2);
|
||||
|
||||
Assert.assertEquals(map.get(key1), value1);
|
||||
Assert.assertEquals(map.get(key2), value2);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user