### Question:
MailApiController extends AbstractApiController { public Result getMailAttachment(@PathParam("mailId") @DbId final Long mailId, @PathParam("attachmentName") @NotBlank final String attachmentName, @Attribute("userId") @DbId final Long userId, final Context context) { return performAction(mailId, userId, context, mail -> { return serveMailAttachment(context, mail, attachmentName); }); }  Result listMails(@Param("mailboxAddress") @Email final String mailboxAddress,
                            @Attribute("userId") @DbId final Long userId, final Context context); Result getMail(@PathParam("mailId") @DbId final Long mailId, @Attribute("userId") @DbId final Long userId,
                          final Context context); Result getMailAttachment(@PathParam("mailId") @DbId final Long mailId,
                                    @PathParam("attachmentName") @NotBlank final String attachmentName,
                                    @Attribute("userId") @DbId final Long userId, final Context context); Result deleteMail(@PathParam("mailId") @DbId final Long mailId, @Attribute("userId") @DbId final Long userId,
                             final Context context);  }### Answer:
@Test public void getMailAttachment() throws Exception { HttpResponse response = apiClient.getMailAttachment(mailId, "test.pdf"); RestApiTestUtils.validateStatusCode(response, 200); RestApiTestUtils.validateResponseContent(response, "application/pdf", 89399); response = apiClient.getMailAttachment(mailId, "test.png"); RestApiTestUtils.validateStatusCode(response, 200); RestApiTestUtils.validateResponseContent(response, "image/png", 5799); }
@Test public void getMailAttachment_unknownName() throws Exception { final HttpResponse response = apiClient.getMailAttachment(mailId, "unknownAttachmentName"); RestApiTestUtils.validateStatusCode(response, 404); }