@Test
    public void testMultiAdd() {
        Marker parent = factory.getMarker(PARENT_MARKER_STR);
        Marker child = factory.getMarker(CHILD_MARKER_STR);
        for (int i = 0; i < 10; i++) {
            parent.add(child);
        }

        // check that the child was added once and only once
        Iterator<Marker> iterator = parent.iterator();
        assertTrue(iterator.hasNext());
        assertEquals(CHILD_MARKER_STR, iterator.next().toString());
        assertFalse(iterator.hasNext());
    }
Unit test BasicMarker

@author Ceki G&uuml;lc&uuml;
@author Joern Huxhorn
slf4j-api/src/test/java/org/slf4j/basicTests/BasicMarkerTest.java