@@ -0,0 +1,1758 @@
+package com.google.graphgeckos.dashboard;%0A%0Aimport java.io.IOException;%0Aimport java.nio.file.Files;%0Aimport java.nio.file.Paths;%0Aimport java.util.stream.Collectors;%0A%0A%0A/** Provides functionality to perform golden file testing. */%0Apublic abstract class AbstractJsonTestInfo %7B%0A%0A  /** Returns path to the folder with the files (inputs and expected outputs) for testing. */%0A  protected abstract String getPath();%0A%0A  /** The file names for one test differ only in prefixes. E.g input_real_json.txt and output_real_json.txt. */%0A  protected static final String INPUT_PREFIX = %22input_%22;%0A  protected static final String EXPECTED_PREFIX = %22output_%22;%0A%0A  /** Inputs and expected outputs are stored as txt files. */%0A  protected static final String FILE_FORMAT = %22.txt%22;%0A%0A  /** Test input (json). */%0A  protected String content;%0A%0A  protected String readFile(String filePath) throws IOException %7B%0A    return Files.lines(Paths.get(filePath)).collect(Collectors.joining(%22%5Cn%22));%0A  %7D%0A%0A  /**%0A   * The expected output for each test is stored as a txt file. One line for each field.%0A   * The order of the values is described in inherited classes.%0A   *%0A   * @param expected Lines of the expected output file for the test.%0A   */%0A  protected abstract void assignExpectedValues(String%5B%5D expected);%0A%0A  public AbstractJsonTestInfo(String testName) %7B%0A    try %7B%0A      content = readFile(getPath() + INPUT_PREFIX + testName + FILE_FORMAT);%0A    %7D catch (IOException e) %7B%0A      System.out.println(%22File not found:%22 + e.getMessage());%0A    %7D%0A    try %7B%0A      String%5B%5D expected = readFile(getPath() + EXPECTED_PREFIX + testName + FILE_FORMAT).split(%22%5Cn%22);%0A      assignExpectedValues(expected);%0A    %7D catch (IOException e) %7B%0A      System.out.println(%22File not found:%22 + e.getMessage());%0A    %7D%0A  %7D%0A%0A%7D%0A

add AbstractJsonTestInfoClass