### Question:
TextualPath { public boolean startsWith(TextualPath prefixPath) { int prefixLength = prefixPath.getLength(); if (prefixLength > pathElements.size()) return false; for (int i = 0; i < prefixLength; i++) { String pathElement = pathElements.get(i); String prefixPathElement = prefixPath.pathElements.get(i); if (!pathElement.equals(prefixPathElement)) return false; } return true; } TextualPath();  TextualPath(String pathElement1);  TextualPath(String pathElement1, String pathElement2);  TextualPath(String pathElement1, String pathElement2, String pathElement3);  TextualPath(TextualPath parent, String child); @Override boolean equals(Object o); @Override int hashCode(); void add(String pathElement); boolean startsWith(TextualPath prefixPath); int getLength(); boolean isEmpty(); TextualPath getParent(); ArrayList<String> getPathElements(); String getFirstElement(); String getLastElement(); @Override String toString();  }### Answer:
@Test public void testStartsWith() throws Exception { assertTrue(new TextualPath("aaa", "bbb").startsWith(new TextualPath("aaa"))); assertTrue(new TextualPath("aaa", "bbb").startsWith(new TextualPath("aaa", "bbb"))); assertTrue(new TextualPath("aaa", "bbb").startsWith(new TextualPath())); assertFalse(new TextualPath("aaa", "bbb").startsWith(new TextualPath("aaa", "ccc"))); assertFalse(new TextualPath("aaa", "bbb").startsWith(new TextualPath("aaa", "bbb", "ccc"))); assertFalse(new TextualPath("aaa", "bbb").startsWith(new TextualPath("bbb", "bbb", "ccc"))); }