@Before
  public void before() {
    csvFileCsvFilePersisterService = serviceFactory.createCsvFilePersisterService(TEST_CSV);
    testCsvPath = Paths.get(TEST_CSV);
  }
Guice module for testing service / factory behavior
ambari-server/src/test/java/org/apache/ambari/server/serveraction/users/CsvFilePersisterServiceFunctionalTest.java