### Question:
FileSystemLineageWriter implements ILineageWriter { protected File getDateFolder( String parentDir, LineageHolder holder ) { String dir = ( parentDir == null ) ? "" : parentDir + File.separator; if ( holder != null && holder.getExecutionProfile() != null ) { IExecutionProfile profile = holder.getExecutionProfile(); dir += dateFolderFormat.format( profile.getExecutionData().getStartTime() ); } else { dir += dateFolderFormat.format( new Date() ); } return new File( dir ); } FileSystemLineageWriter(); @Override void outputExecutionProfile( LineageHolder holder ); @Override void outputLineageGraph( LineageHolder holder ); IGraphWriter getGraphWriter(); void setGraphWriter( IGraphWriter graphWriter ); String getOutputFolder(); void setOutputFolder( String outputFolder ); @Override String getOutputStrategy(); @Override void setOutputStrategy( String strategy ); @Override void cleanOutput( LineageHolder holder ); static final String DEFAULT_OUTPUT_FOLDER; }### Answer:
@Test public void testGetDateFolder() { assertNotNull( writer.getDateFolder( null, null ) ); File folder = writer.getDateFolder( null, holder ); assertNotNull( folder ); assertTrue( folder.getPath().startsWith( writer.dateFolderFormat.format( now ) ) ); folder = writer.getDateFolder( "root", holder ); assertTrue( folder.getPath().startsWith( "root" + File.separator + writer.dateFolderFormat.format( now ) ) ); }