### Question:
PropertiesFileLicenseLog implements LicenseLog { public void logLicenseAccepted(License license, String user, Date acceptedDate) { Properties log = loadLogFile(license, true); String acceptedDateStr = DateUtils.toUTCDateFormat(acceptedDate); log.setProperty(user, acceptedDateStr); saveLogFile(license, log); } PropertiesFileLicenseLog(File logDirectory); void logLicenseAccepted(License license, String user, Date acceptedDate); boolean isLicenseAccepted(License license, String user);  }### Answer:
@Test public void shouldCreateCorrectLogFile() { String name = "test"; String user = "testuser"; License license = new License(name + ".txt", "..."); LicenseLog log = new PropertiesFileLicenseLog(logDir); Date acceptedDate = newDate(); log.logLicenseAccepted(license, user, acceptedDate); File logFile = new File(logDir, name + ".log"); assertTrue(logFile.exists()); }
@Test public void shouldCreateCorrectLogFile() { String name = "test"; String user = "testuser"; License license = new License(name + ".txt", "..."); LicenseLog log = new PropertiesFileLicenseLog(logDir); Date acceptedDate = new Date(); log.logLicenseAccepted(license, user, acceptedDate); File logFile = new File(logDir, name + ".log"); assertTrue(logFile.exists()); }