question: protected String tryCreateNewBaseline ( String actual ) throws IOException { File file = new File ( File . separator + DIRECTORY_TO_COPY_NEW_BASELINE + File . separator + getSubDirectoryPathForNewBaseline ( ) + File . separator + baselineFileName ( ) ) ; Files . createParentDirs ( file ) ; Files . write ( actual , file , Charset . defaultCharset ( ) ) ; return file . toString ( ) ; }
target:  Creates a baseline file that will need to be used to make the current test pass. <p>If the test is failing for a valid reason (e.g. developer changed some of the output text), then this file provides a convenient way for the developer to overwrite the old baseline and keep the test passing. <p>The created file is stored under /tmp or location specified by the environment variable DIRECTORY_TO_COPY_NEW_BASELINE. Information where the file is stored is returned as a string. <p>The directory structure of the package where the baseline file belongs can be retained by setting environment variable RETAIN_DIRECTORY_TREE_FOR_BASELINE_OUTPUT to true. If this variable is not set, the new baseline file is dropped inside a folder name {package name}_testdata <p>This method might be overridden to provide a different way to store a new baseline.