@Before
  public void setUp() throws Exception {
    gfshHistoryFilePath = temporaryFolder.getRoot().toPath().resolve("history").toAbsolutePath();
    gfshLogDirPath = temporaryFolder.getRoot().toPath().resolve("logs").toAbsolutePath();
    initFilePath =
        temporaryFolder.getRoot().toPath().resolve(DEFAULT_INIT_FILE_NAME).toAbsolutePath();

    createFile(gfshHistoryFilePath);
    createDirectory(gfshLogDirPath);

    collectingHandler = new CollectingHandler();
    initializeGfshStatics(logger, collectingHandler);

    Gfsh.gfshout = new PrintStream(new ByteArrayOutputStream());
  }
Restore logging to state prior to the execution of this class
geode-gfsh/src/integrationTest/java/org/apache/geode/management/internal/cli/shell/GfshInitFileIntegrationTest.java