XListResponseEncoder implements ImapResponseEncoder<XListResponse> { @Override public void encode(XListResponse message, ImapResponseComposer composer) throws IOException { ListingEncodingUtils.encodeListingResponse(ImapConstants.XLIST_COMMAND, composer, message); }  @Override Class<XListResponse> acceptableMessages(); @Override void encode(XListResponse message, ImapResponseComposer composer);  }
@Test public void encoderShouldIncludeListCommand() throws Exception { encoder.encode( new XListResponse( MailboxMetaData.Children.HAS_CHILDREN, MailboxMetaData.Selectability.NONE, "name", '.', MailboxType.INBOX), composer); assertThat(writer.getString()).startsWith("* XLIST"); }