@Test
    public void testSelfRecursion() {
        final String diffPrefix = "NEW_" + diff;
        final String PARENT_NAME = diffPrefix + PARENT_MARKER_STR;
        final String NOT_CONTAINED_NAME = diffPrefix + NOT_CONTAINED_MARKER_STR;
        Marker parent = factory.getMarker(PARENT_NAME);
        Marker notContained = factory.getMarker(NOT_CONTAINED_NAME);
        parent.add(parent);
        assertTrue(parent.contains(parent));
        assertTrue(parent.contains(PARENT_NAME));
        assertFalse(parent.contains(notContained));
        assertFalse(parent.contains(NOT_CONTAINED_MARKER_STR));
    }
Unit test BasicMarker

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