public void testTree1() {
        Map refCounts = synchronizeTree(new HashMap());
        TreeNode key = new TreeNode("leaf");
        TreeNode[] value = new TreeNode[]{};
        refCounts.put(key, value);
        setTree(new TreeNode("dummy"));
        try {
            Map result = synchronizeTree(((Question2)answer).referenceCounts(refCounts));
            assertTrue(null, "Your code fails to deal with trees that are leaves.", 
              result != null
              && result.size() == 1
              && result.containsKey(key)
              && result.get(key) != null
              && result.get(key) instanceof Integer
              && ((Integer)(result.get(key))).intValue() == 0);
        } catch(ClassCastException exn) {
            fail(exn, "Caught a `ClassCastException`: you should **only** need to cast to the types `TreeNode` and `Integer`. Check that:\n* your `Map` keys have type **TreeNode**\n* your `Map` values have type **Integer**");                          
        } catch(Throwable exn) {
            fail(exn, "No exception's should be generated, but your code threw: " + exn.getClass().getName());            
        } // end of try-catch        
    } // end of method testTree1