@Before public void setUp() throws Exception { guiceJamesServer = createJmapServer(); guiceJamesServer.start(); DataProbe dataProbe = guiceJamesServer.getProbe(DataProbeImpl.class); dataProbe.addDomain(DOMAIN); dataProbe.addUser(USER_1, PASSWORD); dataProbe.addUser(USER_2, PASSWORD); MailboxProbe mailboxProbe = guiceJamesServer.getProbe(MailboxProbeImpl.class); mailboxProbe.createMailbox(MailboxConstants.USER_NAMESPACE, USER_2, DefaultMailboxes.OUTBOX); mailboxProbe.createMailbox(MailboxConstants.USER_NAMESPACE, USER_1, DefaultMailboxes.SENT); mailboxProbe.createMailbox(MailboxConstants.USER_NAMESPACE, USER_2, DefaultMailboxes.SENT); mailboxProbe.createMailbox(MailboxConstants.USER_NAMESPACE, USER_1, DefaultMailboxes.INBOX); mailboxProbe.createMailbox(MailboxConstants.USER_NAMESPACE, USER_2, DefaultMailboxes.INBOX); await(); jmapGuiceProbe = guiceJamesServer.getProbe(JmapGuiceProbe.class); RestAssured.requestSpecification = jmapRequestSpecBuilder .setPort(jmapGuiceProbe.getJmapPort()) .build(); }