### Question:
OwnerAttributeProvider extends AttributeProvider { @Override public FileOwnerAttributeView view( FileLookup lookup, ImmutableMap<String, FileAttributeView> inheritedViews) { return new View(lookup); }  @Override String name(); @Override ImmutableSet<String> fixedAttributes(); @Override ImmutableMap<String, ?> defaultValues(Map<String, ?> userProvidedDefaults); @NullableDecl @Override Object get(File file, String attribute); @Override void set(File file, String view, String attribute, Object value, boolean create); @Override Class<FileOwnerAttributeView> viewType(); @Override FileOwnerAttributeView view(
      FileLookup lookup, ImmutableMap<String, FileAttributeView> inheritedViews);  }### Answer:
@Test public void testView() throws IOException { FileOwnerAttributeView view = provider.view(fileLookup(), NO_INHERITED_VIEWS); assertThat(view).isNotNull(); assertThat(view.name()).isEqualTo("owner"); assertThat(view.getOwner()).isEqualTo(createUserPrincipal("user")); view.setOwner(createUserPrincipal("root")); assertThat(view.getOwner()).isEqualTo(createUserPrincipal("root")); assertThat(file.getAttribute("owner", "owner")).isEqualTo(createUserPrincipal("root")); }