Hudson { public HudsonBuild findBuild(String jobName, int buildNumber) throws HudsonBuildNotFoundException, HudsonJobNotFoundException { checkJobName(jobName); return hudsonFinder.find(jobName, buildNumber); } Hudson(String hudsonUrl);  Hudson(String hudsonUrl, String login, String password); List<HudsonJob> findAllProjects(); List<String> findAllProjectNames(); HudsonBuild findBuild(String jobName, int buildNumber); HudsonJob findJob(String jobName); String getDescription(String jobName); Date getEstimatedFinishTime(String jobName); int getLastBuildNumber(String projectName); List<String> findJobNames(); List<String> findViews(); List<String> findJobNameByView(String viewName); String findMavenId(String jobName); List<Integer> getBuildNumbers(String jobName); HudsonTestResult findUnitTestResult(String jobName, int lastBuildNumber); HudsonTestResult findIntegrationTestResult(String jobName, int lastBuildNumber); String getUrl();  }
@Test public void should_find_build() throws HudsonBuildNotFoundException, HudsonJobNotFoundException { when(hudsonFinder.find(anyString(), anyInt())).thenReturn(new HudsonBuild()); HudsonBuild build = hudson.findBuild("projectName", 5); assertNotNull(build); }