### Question:
PathTrie { public String findMaxPrefix(final String path) { Objects.requireNonNull(path, "Path cannot be null"); final String[] pathComponents = split(path); readLock.lock(); try { TrieNode parent = rootNode; TrieNode deepestPropertyNode = null; for (final String element : pathComponents) { parent = parent.getChild(element); if (parent == null) { LOG.debug("{}", element); break; } if (parent.hasProperty()) { deepestPropertyNode = parent; } } if (deepestPropertyNode == null) { return "/"; } final Deque<String> treePath = new ArrayDeque<>(); TrieNode node = deepestPropertyNode; while (node != this.rootNode) { treePath.offerFirst(node.getValue()); node = node.parent; } return "/" + String.join("/", treePath); } finally { readLock.unlock(); } } PathTrie(); void addPath(final String path); void deletePath(final String path); boolean existsNode(final String path); String findMaxPrefix(final String path); void clear();  }### Answer:
@Test public void findMaxPrefixNullPath() { assertThrows(NullPointerException.class, () -> { this.pathTrie.findMaxPrefix(null); }); }
@Test public void findMaxPrefixRootPath() { assertEquals("/", this.pathTrie.findMaxPrefix("/")); }