Test attachment creation.