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 testDuplicateAddIncreasesWeight() {
        WeightedEvictableList<String> list = new WeightedEvictableList<>(3, 3);
        list.addOrVote("a");
        list.addOrVote("a");
        list.addOrVote("a");
        assertItemsInOrder(list, "a");
        assertWeightsInOrder(list, 3);
    }