### Question:
Journal { public void clear() { this.entries.clear(); } Journal(SubscriptionData subscription, LoggerPersistenceManager persistenceManager);  Journal(SubscriptionData subscription); void addEntries(List<JournalEntry> newEntries); List<JournalEntry> getEntries(); void removeEntry(int index); void clear(); void flush();  }### Answer:
@Test public void clearTest() { final Journal logger = new Journal(null, JournalTest.MANAGER); final JournalEntry entry1 = new JournalEntry(1234567890, "my first entry"); final JournalEntry entry2 = new JournalEntry(1234597880, "my second entry"); logger.addEntries(Arrays.asList(entry1, entry2)); final List<JournalEntry> theEntries = logger.getEntries(); Assert.assertEquals(2, theEntries.size()); logger.clear(); Assert.assertEquals(0, logger.getEntries().size()); }