MBMailMessage { public void addBytes(String fileName, byte[] bytes) { try { fileName = MimeUtility.decodeText(fileName); } catch (UnsupportedEncodingException unsupportedEncodingException) { if (_log.isWarnEnabled()) { _log.warn( "Unable to decode file name " + fileName, unsupportedEncodingException); } } _bytesOVPs.add(new ObjectValuePair<String, byte[]>(fileName, bytes)); }  void addBytes(String fileName, byte[] bytes); String getBody(); String getHtmlBody(); List<ObjectValuePair<String, InputStream>> getInputStreamOVPs(); String getPlainBody(); void setHtmlBody(String htmlBody); void setPlainBody(String plainBody);  }
@Test public void testAddBytes() throws Exception { MBMailMessage mbMailMessage = new MBMailMessage(); mbMailMessage.addBytes("=?UTF-8?Q?T=C3=ADlde.txt?=", new byte[0]); List<ObjectValuePair<String, InputStream>> inputStreamOVPs = mbMailMessage.getInputStreamOVPs(); ObjectValuePair<String, InputStream> inputStreamOVP = inputStreamOVPs.get(0); Assert.assertEquals("T\u00EDlde.txt", inputStreamOVP.getKey()); }