public void testSaveDocument() throws Exception {
final List<FeedEntry> documentQueue = new ArrayList<FeedEntry>();
documentQueue.add(new FeedEntry(new URI("http://www.foo.com"), "id", 1));
MockDAO dao = new MockDAO(documentQueue);
MockFeedReaderClient feedReaderClient = new MockFeedReaderClient(documentQueue);
DocumentQueueService service = new DocumentQueueService(dao, feedReaderClient, new ErrorReporingToSystemErr());
service.saveDocuments();
assertEquals(0, dao.getDocumentQueue(50).size());
assertEquals(1, dao.savedDocuments.size());
assertEquals(SINGLE_ENTRY, dao.savedDocuments.get(0));