### Question:
BuildServiceImpl extends ServiceSupport implements BuildService { public void deleteBuild(final AbstractProject<?, ?> project, final int buildNumber) { AbstractBuild<?, ?> build = getBuild(project, buildNumber); this.security.checkPermission(build, Run.DELETE); log.debug("Deleting build: {} #{}", project.getName(), buildNumber); try { build.delete(); } catch (IOException e) { throw new ServiceRuntimeException("Delete failed for build " + project.getName() + " #" + buildNumber, e); } } @Inject  BuildServiceImpl(final ProjectService projects, SecurityService security); void deleteBuild(final AbstractProject<?, ?> project, final int buildNumber); void keepBuild(final AbstractProject<?, ?> project, final int buildNumber, final boolean release); AbstractBuild<?, ?> getBuild(final String projectName, final int buildNumber); AbstractBuild<?, ?> getBuild(final AbstractProject<?,?> project, final int buildNumber); AbstractBuild<?, ?> findBuild(final String projectName, final int buildNumber); AbstractBuild<?,?> findBuild(final AbstractProject<?, ?> project, final int buildNumber); void stopBuild(final AbstractProject<?, ?> project, final int buildNumber);  }### Answer:
@Test(expected = NullPointerException.class) public void deleteBuildNullProject() { getInst().deleteBuild(null, 1); }
@Test(expected = IllegalArgumentException.class) public void deleteBuildNegativeBuildNumber() { getInst().deleteBuild(project, -1); }
@Test(expected = IllegalArgumentException.class) public void deleteBuildZeroBuildNumber() { getInst().deleteBuild(project, 0); }