@Override
    public Object[] toArray() {
        return map.values().toArray();
    }
@Test
    public void testToArray() {
        ExtendedSet<TestValue> set = new ExtendedSet<>(Maps.newConcurrentMap());
        TestValue val = new TestValue("foo", 1);
        assertTrue(set.add(val));
        TestValue nextval = new TestValue("goo", 2);
        assertTrue(set.add(nextval));
        Object[] array = set.toArray();
        TestValue[] valarray = {val, nextval};
        assertArrayEquals(valarray, array);
        assertTrue(set.toArray(new TestValue[0])[0] instanceof TestValue);

    }