Added tests for longestCommonAncestor for pointers.