### Question:
FilesPersistenceManager implements LoggerPersistenceManager { public void writeEntries(List<JournalEntry> entries, SubscriptionData subscription) { final SubscriptionLogData theLog = SubscriptionLogData.getBySubscription(subscription); final FilesData theLogFile = theLog.getLogFile(); final List<LoggerEntryMap> theEntries = new ArrayList<LoggerEntryMap>(entries.size()); for (final JournalEntry anEntry : entries) { theEntries.add(new LoggerEntryMap(anEntry, false)); } try { final String content = ConverterFactory.JSON.convertTo(theEntries, false); FilesManagerFactory.FILE_MANAGER.writeContentTo(new ByteArrayInputStream(content.getBytes("UTF-8")), theLogFile.getReference()); } catch (final IOException e) { FilesPersistenceManager.LOGGER.fatal(e, e); } catch (final ConversionException e) { FilesPersistenceManager.LOGGER.fatal(e, e); } FilesPersistenceManager.LOGS_CACHE.put(subscription, entries); }  static LoggerPersistenceManager getInstance(); List<JournalEntry> getEntries(SubscriptionData subscription); void writeEntries(List<JournalEntry> entries, SubscriptionData subscription);  }### Answer:
@Test public void writeEntriesTest() throws UnsupportedEncodingException, IOException { final SubscriptionData theSubscription = SubscriptionData.getData(new SubscriptionMock(0, getMyFirstApplication(), getKowalskyObject())); final LoggerPersistenceManager manager = FilesPersistenceManager.getInstance(); final List<JournalEntry> entriesToAdd = Arrays.asList(new JournalEntry("first"), new JournalEntry("second"), new JournalEntry("third")); manager.writeEntries(entriesToAdd, theSubscription); final FilesData theLogFile = SubscriptionLogData.getBySubscription(theSubscription).getLogFile(); Assert.assertNotNull(theLogFile); final String content = new String(FilesManagerFactory.FILE_MANAGER.getFilesContent(theLogFile.getReference()), "UTF-8"); Assert.assertTrue(FilesPersistenceManagerTest.RESULT.matcher(content).matches()); }