diff --git a/src/test/java/org/redisson/RedissonMapTest.java b/src/test/java/org/redisson/RedissonMapTest.java index 377335d06..60561b0c4 100644 --- a/src/test/java/org/redisson/RedissonMapTest.java +++ b/src/test/java/org/redisson/RedissonMapTest.java @@ -109,6 +109,26 @@ public class RedissonMapTest { } + @Test + public void testNull() { + Redisson redisson = Redisson.create(); + Map 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();