@Test
public void should_find_last_build_number() throws Exception {

    when(hudson.getLastBuildNumber("project1")).thenReturn(5);
    SoftwareProjectId projectId = new SoftwareProjectId("project1");
    String lastBuildId = hudsonConnection.getLastBuildId(projectId);
    assertEquals("5", lastBuildId);
}