### Question:
VisibilityEvaluator { public boolean evaluate(ColumnVisibility visibility) throws VisibilityParseException { return evaluate(visibility.getExpression(), visibility.getParseTree()); } VisibilityEvaluator(AuthorizationContainer authsContainer);  VisibilityEvaluator(Authorizations authorizations); static byte[] escape(byte[] auth, boolean quote); boolean evaluate(ColumnVisibility visibility);  }### Answer:
@Test public void testNonAscii() throws VisibilityParseException { VisibilityEvaluator ct = new VisibilityEvaluator(new Authorizations("五", "六", "八", "九", "五十")); assertTrue(ct.evaluate(new ColumnVisibility(quote("五") + "|" + quote("四")))); assertFalse(ct.evaluate(new ColumnVisibility(quote("五") + "&" + quote("四")))); assertTrue( ct.evaluate(new ColumnVisibility(quote("五") + "&(" + quote("四") + "|" + quote("九") + ")"))); assertTrue(ct.evaluate(new ColumnVisibility("\"五\"&(\"四\"|\"五十\")"))); assertFalse( ct.evaluate(new ColumnVisibility(quote("五") + "&(" + quote("四") + "|" + quote("三") + ")"))); assertFalse(ct.evaluate(new ColumnVisibility("\"五\"&(\"四\"|\"三\")"))); }
@Test public void testNot() throws VisibilityParseException { VisibilityEvaluator e = new VisibilityEvaluator(new Authorizations("a", "b")); assertFalse(e.evaluate(new ColumnVisibility("!a"))); assertTrue(e.evaluate(new ColumnVisibility("a|!b"))); assertTrue(e.evaluate(new ColumnVisibility("!a|b"))); assertFalse(e.evaluate(new ColumnVisibility("!a|!b"))); e = new VisibilityEvaluator(new Authorizations("aaa", "bbb")); assertFalse(e.evaluate(new ColumnVisibility("!aaa"))); assertTrue(e.evaluate(new ColumnVisibility("aaa|!bbb"))); assertTrue(e.evaluate(new ColumnVisibility("!aaa|bbb"))); assertFalse(e.evaluate(new ColumnVisibility("aaa&!(bbb)"))); assertFalse(e.evaluate(new ColumnVisibility("!aaa&bbb"))); assertFalse(e.evaluate(new ColumnVisibility("!(aaa)|!bbb"))); }