### Question:
PluginService extends AbstractService { public List<Plugin> getPlugins() { return asList(client().getForObject("/pluginManager/api/xml?depth=1", Plugin[].class)); } PluginService();  PluginService(JenkinsClient client); List<Plugin> getPlugins();  }### Answer:
@Test public void getPlugins() throws Exception { Plugin[] somePlugins = new Plugin[] {}; when(client.getForObject("/pluginManager/api/xml?depth=1", Plugin[].class)).thenReturn(somePlugins); assertEquals(Arrays.asList(somePlugins), service.getPlugins()); }