src/test/java/com/upplication/s3fs/FileSystemProvider/CheckAccessTest.java
@Ignore
    @Test(expected = AccessDeniedException.class)
    public void checkAccessWriteDifferentUser() throws IOException {
        // fixtures
        AmazonS3ClientMock client = AmazonS3MockFactory.getAmazonClientMock();
        client.bucket("bucketA").dir("dir").file("dir/readOnly");
        // return empty list
        doReturn(client.createReadOnly(new Owner("2", "Read Only"))).when(client).getObjectAcl("bucketA", "dir/readOnly");

        S3FileSystem fs = createNewS3FileSystem();
        S3Path file1 = fs.getPath("/bucketA/dir/readOnly");
        s3fsProvider.checkAccess(file1, AccessMode.WRITE);
    }
/**
     * For explanation why the test case has been ignored,
     * please see the comment on {@link S3AccessControlList#hasPermission},
     *
     * @throws IOException
     */
For explanation why the test case has been ignored,
please see the comment on  S3AccessControlList#hasPermission.


For explanation why the test case has been ignored please see the comment on S3AccessControlList#hasPermission .
@Ignore
    @Test(expected = AccessDeniedException.class)
    public void checkAccessWriteDifferentUser() throws IOException {
        AmazonS3ClientMock client = AmazonS3MockFactory.getAmazonClientMock();
        client.bucket("bucketA").dir("dir").file("dir/readOnly");
        doReturn(client.createReadOnly(new Owner("2", "Read Only"))).when(client).getObjectAcl("bucketA", "dir/readOnly");
        S3FileSystem fs = createNewS3FileSystem();
        S3Path file1 = fs.getPath("/bucketA/dir/readOnly");
        s3fsProvider.checkAccess(file1, AccessMode.WRITE);
    }
@ Ignore @ Test ( expected = AccessDeniedException . class ) public void checkAccessWriteDifferentUser ( ) throws IOException { AmazonS3ClientMock client = AmazonS3MockFactory . getAmazonClientMock ( ) ; client . bucket ( "bucketA" ) . dir ( "dir" ) . file ( "dir/readOnly" ) ; doReturn ( client . createReadOnly ( new Owner ( "2" , "Read Only" ) ) ) . when ( client ) . getObjectAcl ( "bucketA" , "dir/readOnly" ) ; S3FileSystem fs = createNewS3FileSystem ( ) ; S3Path file1 = fs . getPath ( "/bucketA/dir/readOnly" ) ; s3fsProvider . checkAccess ( file1 , AccessMode . WRITE ) ; }
For explanation why the test case has been ignored,
 please see the comment on {@link S3AccessControlList#hasPermission},
For explanation why the test case has been ignored please see the comment on { @link S3AccessControlList#hasPermission }
// fixtures // return empty list