### Question:
SymbolPath implements Comparable<SymbolPath> { public String[] asArray() { List<String> list = new ArrayList<>(); addToList(list); return list.toArray(new String[list.size()]); } SymbolPath(String symbolPathString);  SymbolPath(String[] symbolPath);  SymbolPath(List<String> symbolList);  SymbolPath(Symbol symbol);  SymbolPath(Symbol symbol, boolean excludeLibrary);  SymbolPath(SymbolPath parent, String name); SymbolPath replaceInvalidChars(); String getName(); SymbolPath getParent(); String getParentPath(); String getPath(); SymbolPath append(SymbolPath path); boolean containsPathEntry(String text); @Override int hashCode(); @Override boolean equals(Object obj); boolean matchesPathOf(Symbol s); List<String> asList(); String[] asArray(); @Override String toString(); @Override int compareTo(SymbolPath o);  }### Answer:
@Test public void testToArray() { SymbolPath symbolPath = new SymbolPath("aaa::bbb::bob"); String[] names = symbolPath.asArray(); assertEquals("aaa", names[0]); assertEquals("bbb", names[1]); assertEquals("bob", names[2]); }