### Question:
JobService extends AbstractService { public JobConfiguration getJobConfiguration(Job job) { checkArgumentNotNull(job, "Job cannot be null"); return getJobConfiguration(job.getName()); } 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 getJobConfiguration_WithNullJob_ThrowsException() throws Exception { service.getJobConfiguration((Job) null); }
@Test(expected = IllegalArgumentException.class) public void getJobConfiguration_WithNullJobName_ThrowsException() throws Exception { service.getJobConfiguration(new Job()); }
@Test public void getJobConfiguration() throws Exception { Job job = new Job().setName("vacuum.my.room"); when(client.getForObject("/job/vacuum.my.room/config.xml", JobConfiguration.class)).thenReturn(jobConfiguration); assertEquals(jobConfiguration, service.getJobConfiguration(job)); }