@Test
  public void testFillAttachment() throws Exception {
    final String attachmentContentID = "asda823123123";
    final String fileName = "My.tar.gz";
    final String comment = "blabla";
    final AttachmentType attachmentType = AttachmentType.CLEARING_REPORT;
    final String createdBy = "Me";
    final String createdOn = "Now";

    final Attachment attachment = new Attachment();
    attachment
        .setFilename(fileName)
        .setAttachmentContentId(attachmentContentID)
        .setCreatedComment(comment)
        .setAttachmentType(attachmentType)
        .setCreatedBy(createdBy)
        .setCreatedOn(createdOn);

    final ComponentAttachmentCSVRecordBuilder componentAttachmentCSVRecordBuilder =
        new ComponentAttachmentCSVRecordBuilder();
    componentAttachmentCSVRecordBuilder.fill(attachment);

    final ComponentAttachmentCSVRecord filledRecord = componentAttachmentCSVRecordBuilder.build();

    assertThat(filledRecord.getAttachment(), is(attachment));
  }