@Override
    public synchronized boolean add(E e) {
        int index = originList.indexOf(e);
        if (index > -1) {
            rootSet.set(index);
            return true;
        } else {
            if (tailList == null) {
                tailList = new LinkedList<>();
            }
            return tailList.add(e);
        }
    }
@Test
    void testAdd() {
        List<String> list = Arrays.asList("A", "B", "C");
        BitList<String> bitList = new BitList<>(list);

        bitList.remove("A");

        Assertions.assertEquals(2, bitList.size());

        bitList.addAll(Collections.singletonList("A"));
        Assertions.assertEquals(3, bitList.size());

        bitList.addAll(Collections.singletonList("D"));
        Assertions.assertEquals(4, bitList.size());
        Assertions.assertEquals("D", bitList.get(3));
        Assertions.assertTrue(bitList.hasMoreElementInTailList());
        Assertions.assertEquals(Collections.singletonList("D"), bitList.getTailList());

        bitList.clear();

        bitList.addAll(Collections.singletonList("A"));
        Assertions.assertEquals(1, bitList.size());
        Assertions.assertEquals("A", bitList.get(0));
    }