Base64Service extends ServiceImp { public <T extends Base64Service> T withStyle(Base64Encoding style) { setStyle(style); return (T) this; }  @Override void prepare(); Base64Encoding getStyle(); void setStyle(Base64Encoding style); T withStyle(Base64Encoding style);  }
@Test public void testBase64Service() throws Exception { AdaptrisMessage msg = AdaptrisMessageFactory.getDefaultInstance().newMessage( LINE.getBytes()); execute(new Base64EncodeService().withStyle(Base64Encoding.MIME), msg); execute(new Base64DecodeService(), msg); assertEquals("base64 then debase64 gives same result", LINE, msg .getContent()); }