### Question:
CsvOutput implements Lifecycle, EventReporter { @Override public void start() { csvReporter.start( config.get( csvInterval ).toMillis(), TimeUnit.MILLISECONDS ); logger.info( "Sending metrics to CSV file at " + outputPath ); } CsvOutput( Config config, MetricRegistry registry, Log logger, KernelContext kernelContext,
            FileSystemAbstraction fileSystem, JobScheduler scheduler ); @Override void init(); @Override void start(); @Override void stop(); @Override void shutdown(); @Override void report( SortedMap<String,Gauge> gauges, SortedMap<String,Counter> counters,
            SortedMap<String,Histogram> histograms, SortedMap<String,Meter> meters, SortedMap<String,Timer> timers );  }### Answer:
@Test public void shouldHaveRelativeMetricsCsvPathBeRelativeToNeo4jHome() throws Exception { File home = directory.absolutePath(); Config config = config( MetricsSettings.csvEnabled.name(), "true", MetricsSettings.csvInterval.name(), "10ms", MetricsSettings.csvPath.name(), "the-metrics-dir", GraphDatabaseSettings.neo4j_home.name(), home.getAbsolutePath() ); life.add( createCsvOutput( config ) ); life.start(); waitForFileToAppear( new File( home, "the-metrics-dir" ) ); }
@Test public void shouldHaveAbsoluteMetricsCsvPathBeAbsolute() throws Exception { File outputFPath = Files.createTempDirectory( "output" ).toFile(); Config config = config( MetricsSettings.csvEnabled.name(), "true", MetricsSettings.csvInterval.name(), "10ms", MetricsSettings.csvPath.name(), outputFPath.getAbsolutePath() ); life.add( createCsvOutput( config ) ); life.start(); waitForFileToAppear( outputFPath ); }