### Question:
RelativeFile { @Override public String toString() { return MoreObjects.toStringHelper(this) .add("base", base) .add("path", relativePath) .add("type", type) .toString(); } RelativeFile(@NonNull File base, @NonNull File file);  RelativeFile(@NonNull File base, @NonNull String relativePath);  RelativeFile(@NonNull File base, @NonNull String relativePath, @NonNull Type type); @NonNull File getBase(); @NonNull String getRelativePath(); @NonNull Type getType(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); @NonNull final Type type; }### Answer:
@Test public void relativeFileToString() throws IOException { File base = temporaryFolder.newFolder("basic"); File relative = new File(new File(base, "foo"), "bar"); String toString = new RelativeFile(base, relative).toString(); assertTrue(toString.contains("basic")); assertTrue(toString.contains("foo/bar")); }