@Test
    public void testHomonyms() {
        final String diffPrefix = "homonym" + diff;
        final String PARENT_NAME = diffPrefix + PARENT_MARKER_STR;
        final String CHILD_NAME = diffPrefix + CHILD_MARKER_STR;
        Marker parent = factory.getMarker(PARENT_NAME);
        Marker child = factory.getMarker(CHILD_NAME);
        parent.add(child);

        IMarkerFactory otherFactory = new BasicMarkerFactory();
        Marker otherParent = otherFactory.getMarker(PARENT_NAME);
        Marker otherChild = otherFactory.getMarker(CHILD_NAME);

        assertTrue(parent.contains(otherParent));
        assertTrue(parent.contains(otherChild));

        assertTrue(parent.remove(otherChild));
    }
Unit test BasicMarker

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