private static List<String> getJsons(TestProject project)
      throws VerificationException, IOException {
    Verifier verifier = new Verifier(project.getProjectRoot().toString());
    verifier.setAutoclean(false);
    verifier.addCliOption("-q");
    verifier.addCliOption("-Dimage=testimage");
    verifier.executeGoal("jib:" + InitMojo.GOAL_NAME);

    verifier.verifyErrorFreeLog();
    Path logFile = Paths.get(verifier.getBasedir()).resolve(verifier.getLogFileName());
    String output = String.join("\n", Files.readAllLines(logFile, StandardCharsets.UTF_8)).trim();
    MatcherAssert.assertThat(output, CoreMatchers.containsString("BEGIN JIB JSON"));

    Pattern pattern = Pattern.compile(".*BEGIN JIB JSON\r?\n(\\{.*})");
    Matcher matcher = pattern.matcher(output);
    List<String> jsons = new ArrayList<>();
    while (matcher.find()) {
      jsons.add(matcher.group(1));
    }

    return jsons;
  }
Verifies that the files task succeeded and returns the list of JSON strings printed by the
task.

@param project the project to run the task on
@return the JSON strings printed by the task
jib-maven-plugin/src/test/java/com/google/cloud/tools/jib/maven/skaffold/InitMojoTest.java