### Question:
ST_Loc extends STBase { public ST_Loc cat(String p2) { if (p2 == null) { return this; } String part1 = this.loc; if (part1.endsWith("/")) { part1 = part1.substring(0, part1.length() - 1); } if (p2.startsWith("/")) { p2 = p2.substring(1); } return new ST_Loc(part1 + "/" + p2); } ST_Loc(String path); static ST_Loc getInstance(String loc); static ST_Loc getInstance(Element e); String getLoc(); ST_Loc setLoc(String loc); String[] split(); String parent(); String getFileName(); ST_Loc cat(String p2); ST_Loc cat(ST_Loc loc); boolean endWith(String suffix); @Override String toString();  }### Answer:
@Test void cat(){ ST_Loc part1 = new ST_Loc("Doc_9/Pages/Page_0/"); ST_Loc part2 = new ST_Loc("/Content.xml"); assertEquals("Doc_9/Pages/Page_0/Content.xml", part1.cat(part2).getLoc()); part1 = new ST_Loc("Doc_9/Pages/Page_0"); part2 = new ST_Loc("Content.xml"); assertEquals("Doc_9/Pages/Page_0/Content.xml", part1.cat(part2).toString()); part1 = new ST_Loc("Doc_9/Pages/Page_0/"); part2 = new ST_Loc("Content.xml"); assertEquals("Doc_9/Pages/Page_0/Content.xml", part1.cat(part2).toString()); part1 = new ST_Loc("Doc_9/Pages/Page_0"); part2 = new ST_Loc("/Content.xml"); assertEquals("Doc_9/Pages/Page_0/Content.xml", part1.cat(part2).toString()); part1 = new ST_Loc("/"); part2 = new ST_Loc("Content.xml"); assertEquals("/Content.xml", part1.cat(part2).toString()); }