Test ability to store null values in map

pull/6/head
Nikita 11 years ago
parent 99eda574a0
commit fc99fbf5a0

@ -109,6 +109,26 @@ public class RedissonMapTest {
}
@Test
public void testNull() {
Redisson redisson = Redisson.create();
Map<Integer, String> map = redisson.getMap("simple12");
map.put(1, null);
map.put(2, null);
map.put(3, "43");
Assert.assertEquals(3, map.size());
String val = map.get(2);
Assert.assertNull(val);
String val2 = map.get(1);
Assert.assertNull(val2);
String val3 = map.get(3);
Assert.assertEquals("43", val3);
clear(map);
}
@Test
public void testSimpleTypes() {
Redisson redisson = Redisson.create();

Loading…
Cancel
Save