tests for copy()