### Question:
ReportManager implements Serializable { public String getParentPath( String path ){ List<String> ls = Splitter.on('/').omitEmptyStrings().trimResults().splitToList(path); if( ls.isEmpty() ) return "#"; if( ls.size() == 1 ) return "#"; return "/" + Joiner.on('/').join(ls.subList(0, ls.size() - 1)); }  void execReport(String report); List<ReportFolder> getFolderList(); List<ReportFolder> getParentFolderList( String path ); ReportFolder findOrCreateFolder( String path ); ReportFolder findOrCreateFolder( String path, String type ); void addReport( String path, String report ); ReportFolder getFolder( String path ); List<String> getReports( String path ); String getParentPath( String path ); String getFolderName( String path ); ReportFolder findSubfolder( ReportFolder folder, String folderName ); void sortReports();  }### Answer:
@Test public void testGetParentPath() { System.out.println("testGetParentPath"); String path = "/folder1/folder2/folder3"; ReportManager instance = new ReportManager(); String expResult = "/folder1/folder2"; String result = instance.getParentPath(path); assertEquals(expResult, result); }
@Test public void testGetParentPath2() { System.out.println("testGetParentPath"); String path = "/folder1/folder2/folder3/"; ReportManager instance = new ReportManager(); String expResult = "/folder1/folder2"; String result = instance.getParentPath(path); assertEquals(expResult, result); }
@Test public void testGetParentPath3() { System.out.println("testGetParentPath"); String path = "folder1/folder2/folder3/"; ReportManager instance = new ReportManager(); String expResult = "/folder1/folder2"; String result = instance.getParentPath(path); assertEquals(expResult, result); }
@Test public void testGetParentPath4() { System.out.println("testGetParentPath"); String path = "/folder1"; ReportManager instance = new ReportManager(); String expResult = "#"; String result = instance.getParentPath(path); assertEquals(expResult, result); }
@Test public void testGetParentPath5() { System.out.println("testGetParentPath"); String path = "/"; ReportManager instance = new ReportManager(); String expResult = "#"; String result = instance.getParentPath(path); assertEquals(expResult, result); }