@Test
public void testPreparedReferenceIsValid() throws Exception {

  final String json = "{ }";
  final String vert = "#version 300 es\n"
      + "layout(location=0) in highp vec4 a_position;\n"
      + "void main() { gl_Position = a_position; }";
  final String frag = "#version 300 es\n"
      + "layout(location=0) out highp vec4 _GLF_color;\n"
      + "void main() { _GLF_color = vec4(1.0, 0.0, 0.0, 1.0); }";
  final File jsonFile = temporaryFolder.newFile("shader.json");
  final File vertFile = temporaryFolder.newFile("shader.vert");
  final File fragFile = temporaryFolder.newFile("shader.frag");
  final File output = temporaryFolder.newFile("output.json");
  FileUtils.writeStringToFile(jsonFile, json, StandardCharsets.UTF_8);
  FileUtils.writeStringToFile(vertFile, vert, StandardCharsets.UTF_8);
  FileUtils.writeStringToFile(fragFile, frag, StandardCharsets.UTF_8);
  final ShaderJobFileOperations fileOps = new ShaderJobFileOperations();
  PrepareReference.mainHelper(new String[] { jsonFile.getAbsolutePath(),
      output.getAbsolutePath() });
  assertTrue(fileOps.areShadersValid(output, false));
}