AbstractTreePermission implements TreePermission { @Override public boolean canRead() { long permission = (type == TreeType.ACCESS_CONTROL) ? Permissions.READ_ACCESS_CONTROL : Permissions.READ_NODE; return getPermissionProvider().isGranted(tree, null, permission); } AbstractTreePermission(@NotNull Tree tree, @NotNull TreeType type); @Override @NotNull TreePermission getChildPermission(@NotNull String childName, @NotNull NodeState childState); @Override boolean canRead(); @Override boolean canRead(@NotNull PropertyState property); @Override boolean canReadAll(); @Override boolean canReadProperties(); @Override boolean isGranted(long permissions); @Override boolean isGranted(long permissions, @NotNull PropertyState property);  }
@Test public void testCanRead() { AbstractTreePermission atp = createAbstractTreePermission(tree, TreeType.DEFAULT, pp); atp.canRead(); verify(pp, times(1)).isGranted(tree, null, Permissions.READ_NODE); }