public void testAddArticle() throws Exception {
System.out.println("NewsGroupTest.testAddArticle");
assertEquals( 0, group.size() );
Article article = addTestArticle();
assertEquals( 1, group.size() );
assertEquals( group.getFirstIndex(), group.getLastIndex() );
assertEquals( group.getLastIndex(), article.getArticleNumber() );
Article article2 = NntpTestUtil.createArticle("test.eml");
article2.setMessageId(null);
String oldPath2 = article2.getHeader().get("Path");
group.addArticle( article2, "localhost" );
assertEquals( 2, group.size() );
assertTrue( "Assert that first and last indexes are different after adding two articles.", group.getFirstIndex() != group.getLastIndex() );
assertEquals( "Assert the first article is the firstIndex", group.getFirstIndex(), article.getArticleNumber() );
assertEquals( "Assert the last article is the last index", group.getLastIndex(), article2.getArticleNumber() );
assertTrue( "Assert the old path is contained with the new path, and it doesn't start at index 0.", article2.getHeader().get("Path").indexOf(oldPath2) > 0 );
assertTrue( "Assert the old path starts with localhost.", article2.getHeader().get("Path").startsWith("localhost") );
assertNotNull( "Assert messsage ID is not NULL.", article2.getMessageId() );
assertNotNull( "Assert Date-Received is not NULL", article2.getHeader().get("Date-Received") );
}