use of org.apache.geode.internal.util.concurrent.CustomEntryConcurrentHashMap in project geode by apache.
the class ConcurrentHashMapJUnitTest method testReplace2_NullPointerException.
/**
* replace(x, null) throws NPE
*/
@Test
public void testReplace2_NullPointerException() {
try {
CustomEntryConcurrentHashMap c = new CustomEntryConcurrentHashMap(5);
c.replace("whatever", null);
shouldThrow();
} catch (NullPointerException e) {
}
}
use of org.apache.geode.internal.util.concurrent.CustomEntryConcurrentHashMap in project geode by apache.
the class ConcurrentHashMapJUnitTest method testIsEmpty.
/**
* isEmpty is true of empty map and false for non-empty
*/
@Test
public void testIsEmpty() {
CustomEntryConcurrentHashMap empty = new CustomEntryConcurrentHashMap();
CustomEntryConcurrentHashMap map = map5();
assertTrue(empty.isEmpty());
assertFalse(map.isEmpty());
}
use of org.apache.geode.internal.util.concurrent.CustomEntryConcurrentHashMap in project geode by apache.
the class ConcurrentHashMapJUnitTest method testPutIfAbsent.
/**
* putIfAbsent works when the given key is not present
*/
@Test
public void testPutIfAbsent() {
CustomEntryConcurrentHashMap map = map5();
map.putIfAbsent(six, "Z");
assertTrue(map.containsKey(six));
}
use of org.apache.geode.internal.util.concurrent.CustomEntryConcurrentHashMap in project geode by apache.
the class ConcurrentHashMapJUnitTest method testReplaceValue2_NullPointerException.
/**
* replace(x, null, y) throws NPE
*/
@Test
public void testReplaceValue2_NullPointerException() {
try {
CustomEntryConcurrentHashMap c = new CustomEntryConcurrentHashMap(5);
c.replace("whatever", null, "A");
shouldThrow();
} catch (NullPointerException e) {
}
}
use of org.apache.geode.internal.util.concurrent.CustomEntryConcurrentHashMap in project geode by apache.
the class ConcurrentHashMapJUnitTest method testReplaceValue_NullPointerException.
/**
* replace(null, x, y) throws NPE
*/
@Test
public void testReplaceValue_NullPointerException() {
try {
CustomEntryConcurrentHashMap c = new CustomEntryConcurrentHashMap(5);
c.replace(null, one, "whatever");
shouldThrow();
} catch (NullPointerException e) {
}
}
Aggregations