@Test
@Issue("JENKINS-51716")
public void findNonNumericRun() throws Exception {

    FreeStyleProject freestyle = Mockito.spy(j.createProject(FreeStyleProject.class, "freestyle"));
    FreeStyleBuild build1 = Mockito.mock(FreeStyleBuild.class);
    FreeStyleBuild build2 = Mockito.mock(FreeStyleBuild.class);
    Mockito.when(build1.getId()).thenReturn("build1");
    Mockito.when(build1.getParent()).thenReturn(freestyle);
    Mockito.when(build1.getNextBuild()).thenReturn(build2);
    Mockito.when(build2.getId()).thenReturn("build2");
    Mockito.when(build2.getParent()).thenReturn(freestyle);
    Mockito.when(build2.getPreviousBuild()).thenReturn(build1);
    RunList<FreeStyleBuild> runs = RunList.fromRuns(Arrays.asList(build1, build2));
    Mockito.doReturn(runs).when(freestyle).getBuilds();
    Mockito.doReturn(build2).when(freestyle).getLastBuild();
    FreeStylePipeline freeStylePipeline = (FreeStylePipeline) BluePipelineFactory.resolve(freestyle);
    assertNotNull(freeStylePipeline);
    BlueRun blueRun = freeStylePipeline.getLatestRun();
    assertNotNull(blueRun);
    Links links = blueRun.getLinks();
    assertNotNull(links);
    assertNotNull(links.get("self"));
}