### Question:
FileSystemLocator extends BaseLocator<File> { @Override protected Object getContents( File file ) throws Exception { String content = ""; try { content = FileUtils.readFileToString( file ); } catch ( Throwable e ) { LOG.error( Messages.getString( "ERROR.IndexingDocument", file.getPath() ), e ); } return content; } FileSystemLocator();  FileSystemLocator( List<IDocumentListener> documentListeners ); String getRootFolder(); void setRootFolder( String rootFolder ); @Override void startScan(); @Override URI getRootUri(); static final String LOCATOR_TYPE; }### Answer:
@Test public void testGetContentsBadFile() throws Exception { assertEquals( "", spyLocator.getContents( new File( "not-a-file.txt" ) ) ); }