Add tests for dup and trees.