Add `Copy` derivings.
Fix deprecation warnings in tests.