@CanIgnoreReturnValue
  public PathSubject containsSameBytesAs(String path) throws IOException {
    isRegularFile();

    byte[] expectedBytes = Files.readAllBytes(toPath(path));
    if (!Arrays.equals(expectedBytes, Files.readAllBytes(actual))) {
      failWithActual("expected to contain same bytes as", path);
    }
    return this;
  }
Asserts that the file is a regular file containing the same bytes as the regular file at the
given path.
jimfs/src/test/java/com/google/common/jimfs/PathSubject.java