### Question:
JenkinsService extends AbstractService { public Jenkins getJenkins() { return client().getForObject(SEGMENT_API_XML, Jenkins.class); } JenkinsService();  JenkinsService(JenkinsClient client); Jenkins getJenkins();  }### Answer:
@Test public void getJenkins() throws Exception { Jenkins jenkins = new Jenkins(); when(client.getForObject("/api/xml", Jenkins.class)).thenReturn(jenkins); assertEquals(jenkins, service.getJenkins()); }