@Test
public void testBasicReplacementWorks() throws Exception {

    final BookMeta oldBookMeta = new MockBook("TestTitle", mockPlayer.getName());
    oldBookMeta.setPages(testPages);
    String testPage = "This test should replaceme";
    oldBookMeta.addPage(testPage);
    event = new PlayerEditBookEvent(mockPlayer, 1, new MockBook("", ""), oldBookMeta, false);
    bookListener.loadRuleChain("replace.txt");
    bookListener.onBookEdit(event);
    int pageCount = oldBookMeta.getPageCount();
    BookMeta newBookMeta = event.getNewBookMeta();
    for (int i = 0; i < pageCount - 2; i++) {
        assertEquals(testPages[i], event.getNewBookMeta().getPage(i));
    }
    assertEquals("This test should PASS", newBookMeta.getPage(pageCount - 1));
}