public void onChangeLogParsed(Run<?, ?> build, SCM scm, TaskListener listener, ChangeLogSet<?> changelog) throws Exception {
        if (build instanceof AbstractBuild && listener instanceof BuildListener && Util.isOverridden(SCMListener.class, getClass(), "onChangeLogParsed", AbstractBuild.class, BuildListener.class, ChangeLogSet.class)) {
            onChangeLogParsed((AbstractBuild) build, (BuildListener) listener, changelog);
        }
    }
@Issue("JENKINS-23522")
    @SuppressWarnings("rawtypes")
    @Test public void onChangeLogParsed() throws Exception {
        SCM scm = Mockito.mock(SCM.class);
        BuildListener bl = Mockito.mock(BuildListener.class);
        ChangeLogSet cls = Mockito.mock(ChangeLogSet.class);
        AbstractBuild ab = Mockito.mock(AbstractBuild.class);
        AbstractProject ap = Mockito.mock(AbstractProject.class);
        Mockito.when(ab.getProject()).thenReturn(ap);
        Mockito.when(ap.getScm()).thenReturn(scm);
        for (L l : new L[] {new L1(), new L2(), new L3()}) {
            assertEquals(0, l.cnt);
            l.onChangeLogParsed(ab, bl, cls);
            assertEquals(1, l.cnt);
            l.onChangeLogParsed(ab, scm, bl, cls);
            assertEquals(2, l.cnt);
        }
        Run r = Mockito.mock(Run.class);
        TaskListener tl = Mockito.mock(TaskListener.class);
        L l = new L1();
        l.onChangeLogParsed(r, scm, tl, cls);
        assertEquals("cannot handle this", 0, l.cnt);
        l = new L2();
        l.onChangeLogParsed(r, scm, tl, cls);
        assertEquals("does handle this", 1, l.cnt);
        l = new L3();
        l.onChangeLogParsed(r, scm, tl, cls);
        assertEquals("cannot handle this", 0, l.cnt);
    }