@Test
  public void testBuild_skipDownloadingBaseImageLayers() throws IOException, InterruptedException {
    Path baseLayersCacheDirectory =
        simpleTestProject.getProjectRoot().resolve("build/jib-base-cache/layers");
    String targetImage = dockerHost + ":6000/simpleimage:gradle" + System.nanoTime();

    buildAndRunComplex(targetImage, "testuser", "testpassword", localRegistry2);
    // Base image layer tarballs exist.
    assertThat(Files.exists(baseLayersCacheDirectory)).isTrue();
    assertThat(baseLayersCacheDirectory.toFile().list().length >= 2).isTrue();

    buildAndRunComplex(targetImage, "testuser", "testpassword", localRegistry2);
    // no base layers downloaded after "gradle clean jib ..."
    assertThat(Files.exists(baseLayersCacheDirectory)).isFalse();
  }
Asserts that the test project has the required exposed ports, labels and volumes.

@param imageReference the image to test
@throws IOException if the {@code docker inspect} command fails to run
@throws InterruptedException if the {@code docker inspect} command is interrupted
jib-gradle-plugin/src/integration-test/java/com/google/cloud/tools/jib/gradle/SingleProjectIntegrationTest.java