new tests for attachments and stub impl
refactoring test