@@ -0,0 +1,2507 @@
+// Copyright 2013 Google Inc. All Rights Reserved.%0A//%0A// Licensed under the Apache License, Version 2.0 (the %22License%22);%0A// you may not use this file except in compliance with the License.%0A// You may obtain a copy of the License at%0A//%0A//      http://www.apache.org/licenses/LICENSE-2.0%0A//%0A// Unless required by applicable law or agreed to in writing, software%0A// distributed under the License is distributed on an %22AS IS%22 BASIS,%0A// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A// See the License for the specific language governing permissions and%0A// limitations under the License.%0A%0Apackage com.google.enterprise.adaptor.fs;%0A%0Aimport static org.junit.Assert.*;%0A%0Aimport com.google.common.collect.ImmutableList;%0A%0Aimport org.junit.*;%0Aimport org.junit.rules.ExpectedException;%0A%0Aimport java.io.IOException;%0Aimport java.nio.file.attribute.AclEntry;%0Aimport java.nio.file.attribute.AclEntryPermission;%0Aimport java.nio.file.attribute.AclEntryType;%0Aimport java.nio.file.attribute.AclFileAttributeView;%0Aimport java.nio.file.attribute.UserPrincipal;%0Aimport java.util.List;%0A%0A/**%0A * Test cases for %7B@link SimpleAclFileAttributeView%7D.%0A */%0Apublic class SimpleAclFileAttributeViewTest %7B%0A  @Rule%0A  public ExpectedException thrown = ExpectedException.none();%0A%0A  private final UserPrincipal user = new UserPrincipal() %7B%0A        public String getName() %7B%0A          return %22foo%22;%0A        %7D%0A      %7D;%0A  private final AclEntry aclEntry = AclEntry.newBuilder()%0A      .setType(AclEntryType.ALLOW)%0A      .setPrincipal(user)%0A      .setPermissions(AclEntryPermission.READ_DATA)%0A      .build();%0A  private final List%3CAclEntry%3E acl = ImmutableList.of(aclEntry);%0A  private final AclFileAttributeView aclView =%0A      new SimpleAclFileAttributeView(acl);%0A%0A  @Test%0A  public void testGetAcl() throws IOException %7B%0A    assertEquals(acl, aclView.getAcl());%0A  %7D%0A%0A  @Test%0A  public void testConstructorNullList() %7B%0A    thrown.expect(NullPointerException.class);%0A    new SimpleAclFileAttributeView(null);%0A  %7D%0A%0A  @Test%0A  public void testSetAcl() throws IOException %7B%0A    thrown.expect(UnsupportedOperationException.class);%0A    aclView.setAcl(acl);%0A  %7D%0A%0A  @Test%0A  public void testGetOwner() throws IOException %7B%0A    thrown.expect(UnsupportedOperationException.class);%0A    aclView.getOwner();%0A  %7D%0A%0A  @Test%0A  public void testSetOwner() throws IOException %7B%0A    thrown.expect(UnsupportedOperationException.class);%0A    aclView.setOwner(user);%0A  %7D%0A%0A  @Test%0A  public void testName() %7B%0A    assertEquals(%22acl%22, aclView.name());%0A  %7D%0A%7D%0A

Add SimpleAclFileAttributeViewTest. Code Review: http://codereview.appspot.com/23900043