public Attribute attribute(final String attribute) {
    return new Attribute() {
      @Override
      public Attribute is(Object value) throws IOException {
        Object actualValue = Files.getAttribute(actual, attribute, linkOptions);
        check("attribute(%s)", attribute).that(actualValue).isEqualTo(value);
        return this;
      }

      @Override
      public Attribute isNot(Object value) throws IOException {
        Object actualValue = Files.getAttribute(actual, attribute, linkOptions);
        check("attribute(%s)", attribute).that(actualValue).isNotEqualTo(value);
        return this;
      }

      @Override
      public PathSubject and() {
        return PathSubject.this;
      }
    };
  }
Returns an object for making assertions about the given attribute.
jimfs/src/test/java/com/google/common/jimfs/PathSubject.java