@Test public void testMboxParsing() throws IOException { Iterator<Message> iter = parser.parse(new FileInputStream(new File(TU.TEST_FOLDER, WRONGBODY_MBOX))); boolean fail = true; int i = 1; while (iter.hasNext()) { final Message message = iter.next(); File bodyFile = new File(TU.TEST_FOLDER, specialPathFromFilePath(WRONGBODY_MBOX, "_bodyOf" + i, "txt")); if (bodyFile.exists()) { final String actual = getPlainBody(message); final String expected = readTextFile(bodyFile); assertEquals("Body #"+i, expected, actual); fail = false; } i++; } if (fail) { fail("No file with expected body."); } }
@Override public Iterator<Message> parse(InputStream is) throws IOException { return new Mime4jParserIterator(is); }
Mime4jMboxParserImpl implements MboxParser { @Override public Iterator<Message> parse(InputStream is) throws IOException { return new Mime4jParserIterator(is); } }
Mime4jMboxParserImpl implements MboxParser { @Override public Iterator<Message> parse(InputStream is) throws IOException { return new Mime4jParserIterator(is); }  }
Mime4jMboxParserImpl implements MboxParser { @Override public Iterator<Message> parse(InputStream is) throws IOException { return new Mime4jParserIterator(is); }  @Override Iterator<Message> parse(InputStream is); }
Mime4jMboxParserImpl implements MboxParser { @Override public Iterator<Message> parse(InputStream is) throws IOException { return new Mime4jParserIterator(is); }  @Override Iterator<Message> parse(InputStream is);  }