EscapeTool extends org.apache.velocity.tools.generic.EscapeTool { public String quotedPrintable(Object content) { if (content != null) { try { return new QuotedPrintableCodec().encode(String.valueOf(content)); } catch (EncoderException ex) { } } return null; }  @Override String xml(Object content); String json(Object string); String quotedPrintable(Object content); String q(Object content); String b(Object content); String url(Map<String, ?> parametersMap); String css(String identifier); @Override String url(Object string);  }
@Test void quotedPrintableWithNull() { assertNull(this.tool.quotedPrintable(null)); }
@Test void quotedPrintableWithSimpleText() { assertEquals("Hello World", this.tool.quotedPrintable("Hello World")); }
@Test void quotedPrintableWithSpecialChars() { assertEquals("a=3Db=0A", this.tool.quotedPrintable("a=b\n")); }
@Test void quotedPrintableWithNonAsciiChars() { assertEquals("=C4=A3", this.tool.quotedPrintable("\u0123")); }