### Question:
GuestbookNavigation { public Entry getPrevious() { Entry previous = null; for (Entry entry : entryDao.readAll()) { if (entry.getId().equals(current.getId()) && previous != null) { return previous; } previous = entry; } return null; }  Entry getCurrent(); void setCurrent(Entry argCurrent); Entry getNext(); Entry getPrevious(); boolean isNextExists(); boolean isPreviousExists(); EntryDao getEntryDao(); void setEntryDao(EntryDao argEntryDao);  }### Answer:
@Test public void test_no_previous() { expect(daoMock.readAll()).andReturn(new ArrayList<Entry>()); replay(daoMock); assertNull(classUnderTest.getPrevious()); verify(daoMock); }