### Question:
ImageReference { public boolean isScratch() { return "".equals(registry) && "scratch".equals(repository) && Strings.isNullOrEmpty(tag) && Strings.isNullOrEmpty(digest); } private  ImageReference(
      String registry, String repository, @Nullable String tag, @Nullable String digest); static ImageReference parse(String reference); static ImageReference of(
      @Nullable String registry, String repository, @Nullable String qualifier); static ImageReference of(
      @Nullable String registry, String repository, @Nullable String tag, @Nullable String digest); static ImageReference scratch(); static boolean isValidRegistry(String registry); static boolean isValidRepository(String repository); static boolean isValidTag(String tag); static boolean isValidDigest(String digest); static boolean isDefaultTag(@Nullable String tag); String getRegistry(); String getRepository(); Optional<String> getTag(); Optional<String> getDigest(); String getQualifier(); boolean usesDefaultTag(); boolean isScratch(); ImageReference withQualifier(String newQualifier); @Override String toString(); String toStringWithQualifier(); @Override boolean equals(Object other); @Override int hashCode();  }### Answer:
@Test public void testIsScratch() throws InvalidImageReferenceException { Assert.assertTrue(ImageReference.parse("scratch").isScratch()); Assert.assertTrue(ImageReference.scratch().isScratch()); Assert.assertFalse(ImageReference.of("", "scratch", "").isScratch()); Assert.assertFalse(ImageReference.of(null, "scratch", null).isScratch()); }