@Test
public void should_get_last_build_number() throws HudsonJobNotFoundException, HudsonBuildNotFoundException {

    when(hudsonFinder.getLastBuildNumber("projectName")).thenReturn(42);
    int lastBuildNumber = hudson.getLastBuildNumber("projectName");
    assertEquals(42, lastBuildNumber);
}