@Override
    public V get(Object key) {
        checkNotNull(key, "Key cannot be null.");
        byte[] bytes = items.get(serializer.encode(key));
        return bytes == null ? null : serializer.decode(bytes);
    }
@Test
    public void testGet() throws Exception {
        //Tests value retrieval and nonexistent key return values
        for (int i = 0; i < 10; i++) {
            map.put(i, i);
            for (int j = 0; j <= i; j++) {
                assertEquals("The value was wrong.", Integer.valueOf(j), map.get(j));
            }
        }
        assertNull("Null return value for nonexistent keys.", map.get(10));
    }