@@ -236,6 +236,22 @@ public void testBasicExclusiveAccess() {
236236 assertThat (tree .canWrite (path ("foo/baz" )), is (false ));
237237 assertThat (tree .canRead (path ("foo/bar" )), is (false ));
238238 assertThat (tree .canWrite (path ("foo/bar" )), is (false ));
239+ tree = accessTree (
240+ entitlement ("foo" , "read" , "foo.xml" , "read" , "foo/bar.xml" , "read_write" ),
241+ exclusivePaths ("test-component" , "diff-module" , "foo/bar" )
242+ );
243+ assertThat (tree .canRead (path ("foo" )), is (true ));
244+ assertThat (tree .canWrite (path ("foo" )), is (false ));
245+ assertThat (tree .canRead (path ("foo.xml" )), is (true ));
246+ assertThat (tree .canWrite (path ("foo.xml" )), is (false ));
247+ assertThat (tree .canRead (path ("foo/baz" )), is (true ));
248+ assertThat (tree .canWrite (path ("foo/baz" )), is (false ));
249+ assertThat (tree .canRead (path ("foo/bar" )), is (false ));
250+ assertThat (tree .canWrite (path ("foo/bar" )), is (false ));
251+ assertThat (tree .canRead (path ("foo/bar.xml" )), is (true ));
252+ assertThat (tree .canWrite (path ("foo/bar.xml" )), is (true ));
253+ assertThat (tree .canRead (path ("foo/bar.baz" )), is (true ));
254+ assertThat (tree .canWrite (path ("foo/bar.baz" )), is (false ));
239255 }
240256
241257 public void testInvalidExclusiveAccess () {
0 commit comments