ContextImpl implements Context, Constants { @Override public boolean definesContextRoot(@NotNull Tree tree) { return Utils.isPrincipalPolicyTree(tree); } private  ContextImpl(); @Override boolean definesProperty(@NotNull Tree parent, @NotNull PropertyState property); @Override boolean definesContextRoot(@NotNull Tree tree); @Override boolean definesTree(@NotNull Tree tree); @Override boolean definesLocation(@NotNull TreeLocation location); @Override boolean definesInternal(@NotNull Tree tree);  }
@Test public void testDefinesCtxRoot() { assertTrue(CTX.definesContextRoot(mockTree(REP_PRINCIPAL_POLICY, NT_REP_PRINCIPAL_POLICY, true))); }
@Test public void testNotDefinesCtxRoot() { assertFalse(CTX.definesContextRoot(mockTree(REP_PRINCIPAL_POLICY, NT_REP_PRINCIPAL_POLICY, false))); assertFalse(CTX.definesContextRoot(mockTree(AccessControlConstants.REP_POLICY, NT_REP_PRINCIPAL_POLICY, true))); assertFalse(CTX.definesContextRoot(mockTree(REP_PRINCIPAL_POLICY, AccessControlConstants.NT_REP_POLICY, true))); assertFalse(CTX.definesContextRoot(mockTree(REP_RESTRICTIONS, NT_REP_RESTRICTIONS, true))); }