### Question:
JenkinsJobProperty extends AbstractJenkinsProperty { public List<String> getPathComponents() { return Arrays.asList(withFolders(job).split("/job/")); } JenkinsJobProperty(JenkinsConfiguration configuration, String job); String getUrl(); List<String> getPathComponents();  }### Answer:
@Test public void getPathComponentsForSimpleJob() { JenkinsJobProperty property = new JenkinsJobProperty( new JenkinsConfiguration("Test", "http: "test" ); assertEquals(Collections.singletonList("test"), property.getPathComponents()); }
@Test public void getPathComponentsForFolderJob() { JenkinsJobProperty property = new JenkinsJobProperty( new JenkinsConfiguration("Test", "http: "test/test-master/test-master-build" ); assertEquals(Arrays.asList("test", "test-master", "test-master-build"), property.getPathComponents()); }
@Test public void getPathComponentsForCompleteFolderJob() { JenkinsJobProperty property = new JenkinsJobProperty( new JenkinsConfiguration("Test", "http: "test/job/test-master/job/test-master-build" ); assertEquals(Arrays.asList("test", "test-master", "test-master-build"), property.getPathComponents()); }