public WeightedItem<T> addOrVote(T item) {
        for (int i = 0; i < list.size(); i++) {
            WeightedItem<T> weightedItem = list.get(i);
            if (weightedItem.item.equals(item)) {
                voteFor(weightedItem);
                return weightedItem;
            }
        }
        return organizeAndAdd(item);
    }
@Test
    public void testScenario() {
        WeightedEvictableList<String> list = new WeightedEvictableList<>(3, 3);
        list.addOrVote("a");
        list.addOrVote("b");
        list.addOrVote("c");

        // 3 iterations are here, now list will organize itself. Since all items have 1 vote, order does not change
        assertItemsInOrder(list, "a", "b", "c");
        assertWeightsInOrder(list, 1, 1, 1);

        list.addOrVote("c");
        list.addOrVote("b");
        list.addOrVote("c");
        // 3 iterations are here, now list will organize itself
        assertItemsInOrder(list, "c", "b", "a");
        assertWeightsInOrder(list, 3, 2, 1);

        list.addOrVote("b");
        list.addOrVote("c");
        list.addOrVote("d");
        // "c" has the most votes. 2 items has to go.

        assertItemsInOrder(list, "c", "d");
        assertWeightsInOrder(list, 0, 1);

        list.addOrVote("d"); //let the list re-organize now
        assertItemsInOrder(list, "d", "c");

        list.addOrVote("x");
        assertItemsInOrder(list, "d", "c", "x");
        assertWeightsInOrder(list, 2, 0, 1);

        list.addOrVote("x");
        list.addOrVote("x");
        list.addOrVote("x");
        assertItemsInOrder(list, "x", "d", "c");
        assertWeightsInOrder(list, 4, 2, 0);
    }