Ports refactored TestAttachments.