### Question:
JobService extends AbstractService { public Job updateJob(String name, JobConfiguration configuration) { checkArgumentNotNull(name, "Name cannot be null"); checkArgumentNotNull(configuration, "JobConfiguration cannot be null"); client().postForLocation(SEGMENT_JOB + "/" + name + SEGMENT_CONFIG_XML, configuration); return getJob(name); } JobService();  JobService(JenkinsClient client); List<Job> getJobs(); Job createJob(String name, JobConfiguration configuration); Job updateJob(String name, JobConfiguration configuration); Job updateJob(Job job, JobConfiguration configuration); void deleteJob(String name); void deleteJob(Job job); Job getJob(String name); JobConfiguration getJobConfiguration(Job job); JobConfiguration getJobConfiguration(String name); Long triggerBuild(Job job); Long triggerBuild(Job job, Map<String, Object> parameters); Build getBuild(Job job, Long buildNumber); Build getBuild(String name, Long buildNumber); Build triggerBuildAndWait(Job job); Build triggerBuildAndWait(Job job, Map<String, Object> parameters);  }### Answer:
@Test(expected = IllegalArgumentException.class) public void updateJob_WithNullName_ThrowsException() throws Exception { service.updateJob((String) null, jobConfiguration); }
@Test(expected = IllegalArgumentException.class) public void updateJob_WithNullJobName_ThrowsException() throws Exception { service.updateJob(new Job(), jobConfiguration); }
@Test(expected = IllegalArgumentException.class) public void updateJob_WithNullJobConfiguration_ThrowsException() throws Exception { service.updateJob("my.job", null); }
@Test public void updateJob() throws Exception { service.updateJob("my.job", jobConfiguration); verify(client).postForLocation("/job/my.job/config.xml", jobConfiguration); }