@Override
    public boolean add(E item) {
        checkNotNull(item, "Item to be added cannot be null.");
        return items.add(serializer.encode(item));
    }
@Test
    public void testAdd() throws Exception {
        //Test of add
        for (int i = 0; i < 10; i++) {
            assertEquals("The size of the set is wrong.", i, set.size());
            assertTrue("The first add of an element should be true.", set.add(i));
            assertFalse("The second add of an element should be false.", set.add(i));
        }
    }