private static String readDigestFile(Path digestPath) throws IOException, DigestException {
    assertThat(Files.exists(digestPath)).isTrue();
    String digest = new String(Files.readAllBytes(digestPath), StandardCharsets.UTF_8);
    return DescriptorDigest.fromDigest(digest).toString();
  }
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