@Override
    public synchronized boolean remove(Object o) {
        int idx = originList.indexOf(o);
        if (idx > -1 && rootSet.get(idx)) {
            rootSet.set(idx, false);
            return true;
        }
        if (CollectionUtils.isNotEmpty(tailList)) {
            return tailList.remove(o);
        }
        return false;
    }
@Test
    void testRemove() {
        List<String> list = Arrays.asList("A", "B", "C");
        BitList<String> bitList = new BitList<>(list);

        Assertions.assertTrue(bitList.remove("A"));
        Assertions.assertFalse(bitList.remove("A"));

        Assertions.assertTrue(bitList.removeAll(Collections.singletonList("B")));
        Assertions.assertFalse(bitList.removeAll(Collections.singletonList("B")));

        Assertions.assertFalse(bitList.removeAll(Collections.singletonList("D")));

        bitList.add("D");
        Assertions.assertTrue(bitList.removeAll(Collections.singletonList("D")));
        Assertions.assertFalse(bitList.hasMoreElementInTailList());

        bitList.add("A");
        bitList.add("E");
        bitList.add("F");

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

        Assertions.assertFalse(bitList.removeAll(Collections.singletonList("D")));
        Assertions.assertTrue(bitList.removeAll(Collections.singletonList("A")));
        Assertions.assertTrue(bitList.removeAll(Collections.singletonList("C")));
        Assertions.assertTrue(bitList.removeAll(Collections.singletonList("E")));
        Assertions.assertTrue(bitList.removeAll(Collections.singletonList("F")));

        Assertions.assertTrue(bitList.isEmpty());
    }