@Test
  public void testSyncMapTask_failIfJarContainerizationMode() throws IOException {
    Path projectRoot = simpleTestProject.getProjectRoot();
    try {
      generateTemplate(
          simpleTestProject, null, ImmutableList.of("-Djib.containerizingMode=packaged"));
      Assert.fail();
    } catch (UnexpectedBuildFailure ex) {
      Assert.assertTrue(
          ex.getMessage()
              .contains(
                  "Skaffold sync is currently only available for Jib projects in 'exploded' containerizing mode, but the containerizing mode of "
                      + projectRoot.getFileName()
                      + " is 'packaged'"));
    }
  }
Verifies that the sync map task succeeded and returns the parsed json.

@param project the project to run the task on
@param moduleName the name of the sub-project, or {@code null} if no sub-project
@param params extra gradle cli params to use during the build
@return the list of paths printed by the task
@throws IOException if the json parser fails
jib-gradle-plugin/src/test/java/com/google/cloud/tools/jib/gradle/skaffold/SyncMapTaskTest.java