public void clear() {
        votersHistory.clear();
    }
@Test
    void testClear() {
        Map<Integer, VoterSet.VoterNode> voterMap = VoterSetTest.voterMap(IntStream.of(1, 2, 3), true);
        VoterSet staticVoterSet = VoterSet.fromMap(new HashMap<>(voterMap));
        VoterSetHistory votersHistory = new VoterSetHistory(staticVoterSet);

        // Add voter 4 to the voter set and voter set history
        voterMap.put(4, VoterSetTest.voterNode(4, true));
        VoterSet voterSet1234 = VoterSet.fromMap(new HashMap<>(voterMap));
        votersHistory.addAt(100, voterSet1234);

        // Add voter 5 to the voter set and voter set history
        voterMap.put(5, VoterSetTest.voterNode(5, true));
        VoterSet voterSet12345 = VoterSet.fromMap(new HashMap<>(voterMap));
        votersHistory.addAt(200, voterSet12345);

        votersHistory.clear();

        assertEquals(staticVoterSet, votersHistory.lastValue());
    }