@Test
    public void testOutput() throws Exception {
        List<String> list = new List<>();
        list.addToEnd("test1");
        list.addToEnd("test2");
        list.addToEnd("test3");
        int elementCount = 0;
        for (String current : list) {
            if (list.exist(current)) {
                elementCount++;
            }
        }
        assertEquals(list.listAmount(), elementCount);
        for (String current : list) {
            list.deleteElement(current);
        }
        assertTrue(list.isEmpty());
    }