### Question:
NodeRef implements Bounded, Comparable<NodeRef> { public static void checkValidPath(final String path) { if (path == null) { throw new IllegalArgumentException("null path"); } if (path.isEmpty()) { throw new IllegalArgumentException("empty path"); } if (path.charAt(path.length() - 1) == PATH_SEPARATOR) { throw new IllegalArgumentException("path cannot end with path separator: " + path); } } NodeRef(Node node, String parentPath, ObjectId metadataId); String getParentPath(); Node getNode(); String path(); String name(); ObjectId objectId(); ObjectId getMetadataId(); RevObject.TYPE getType(); @Override boolean equals(Object o); @Override int hashCode(); @Override int compareTo(NodeRef o); @Override String toString(); static @Nullable String parentPath(@Nullable String fullPath); static void checkValidPath(final String path); static @Nullable String nodeFromPath(@Nullable String fullPath); static boolean isDirectChild(String parentPath, String nodePath); static boolean isChild(String parentPath, String nodePath); static List<String> allPathsTo(final String path); static ImmutableList<String> split(final String path); static String appendChild(String parentTreePath, String childName); @Override boolean intersects(Envelope env); @Override void expand(Envelope env); static int depth(String path); static String removeParent(final String parentPath, final String childPath); static final String ROOT; static final char PATH_SEPARATOR; }### Answer:
@Test public void testCheckValidPathNull() { exception.expect(IllegalArgumentException.class); NodeRef.checkValidPath(null); }
@Test public void testCheckValidPathEmptyString() { exception.expect(IllegalArgumentException.class); NodeRef.checkValidPath(""); }
@Test public void testCheckValidPathPathEndingWithSeperator() { exception.expect(IllegalArgumentException.class); NodeRef.checkValidPath("Points/"); }
@Test public void testCheckValidPath() { NodeRef.checkValidPath("Points"); }