LSubResponseEncoder implements ImapResponseEncoder<LSubResponse> { @Override public void encode(LSubResponse response, ImapResponseComposer composer) throws IOException { ListingEncodingUtils.encodeListingResponse(ImapConstants.LSUB_COMMAND, composer, response); }  @Override Class<LSubResponse> acceptableMessages(); @Override void encode(LSubResponse response, ImapResponseComposer composer);  }
@Test public void encoderShouldIncludeLSUBCommand() throws Exception { encoder.encode(new LSubResponse("name", true, '.'), composer); assertThat(writer.getString()).startsWith("* LSUB"); }