### Question:
PathComponents { String getLast() { return pathComponents[pathComponents.length - 1]; } PathComponents(String path);   }### Answer:
@Test public void getLast() { assertEquals("a", components1.getLast()); assertEquals("bcd", components2.getLast()); assertEquals("defg", components3.getLast()); }