### Question:
ScanLocation { public String toLogString() { if (scanFiles != null) { return scanFiles.toString(); } else if (scanDirectory != null) { return scanDirectory.getAbsolutePath(); } else { return "<not configured>"; } } ScanLocation(final File scanDirectory);  ScanLocation(final List<File> scanFiles); final File getScanDirectory(); final List<File> getScanFiles(); @Override String toString(); String toLogString();  }### Answer:
@Test public void testToLogStringDirectory() throws Exception { final ScanLocation scanLocation = new ScanLocation(new File(".")); final String result = scanLocation.toLogString(); Assert.assertNotNull("toLogString()", result); }
@Test public void testToLogStringFileListEmpty() throws Exception { final ScanLocation scanLocation = new ScanLocation(new ArrayList<>()); final String result = scanLocation.toLogString(); Assert.assertNotNull("toLogString()", result); }