RedBlackTree { protected boolean isRed(Node x) { if (x == null) return false; return x.color == Color.RED; }    }
@Test public void testIsRed() { RedBlackTree<String, Integer>.Node node1 = tester.new Node("E", 1, 0, RedBlackTree.Color.RED); RedBlackTree<String, Integer>.Node node2 = tester.new Node("E", 1, 0, RedBlackTree.Color.BLACK); assertTrue(tester.isRed(node1)); assertTrue(!tester.isRed(node2)); assertTrue(!tester.isRed(null)); }