### Question:
MailboxApiController extends AbstractApiController { public Result getMailbox(@PathParam("mailboxAddress") @Email final String mailboxAddress, @Attribute("userId") @DbId final Long userId, final Context context) { return performAction(userId, mailboxAddress, context, mailbox -> { final MailboxData mailboxData = new MailboxData(mailbox); return ApiResults.ok().render(mailboxData); }); }  Result listMailboxes(@Attribute("userId") @DbId final Long userId, final Context context); Result createMailbox(@JSR303Validation final MailboxData mailboxData, @Attribute("user") final User user,
                                final Context context); Result getMailbox(@PathParam("mailboxAddress") @Email final String mailboxAddress,
                             @Attribute("userId") @DbId final Long userId, final Context context); Result updateMailbox(@PathParam("mailboxAddress") @Email final String mailboxAddress,
                                @JSR303Validation final MailboxData mailboxData,
                                @Attribute("userId") @DbId final Long userId, final Context context); Result deleteMailbox(@PathParam("mailboxAddress") @Email final String mailboxAddress,
                                @Attribute("userId") @DbId final Long userId, final Context context);  }### Answer:
@Test public void getMailbox() throws Exception { final MBox mailbox = TestDataUtils.createMailbox(user); final HttpResponse response = apiClient.getMailbox(mailbox.getFullAddress()); RestApiTestUtils.validateStatusCode(response, 200); final MailboxData mailboxData = RestApiTestUtils.getResponseBodyAs(response, MailboxData.class); RestApiTestUtils.validateMailboxData(mailboxData, mailbox); }
@Test public void getMailbox_invalidAddress() throws Exception { final HttpResponse response = apiClient.getMailbox(invalidAddress); RestApiTestUtils.validateStatusCode(response, 400); RestApiTestUtils.validateErrors(response, "mailboxAddress"); }
@Test public void getMailbox_unknownMailbox() throws Exception { final HttpResponse response = apiClient.getMailbox(unknownAddress); RestApiTestUtils.validateStatusCode(response, 404); }