public String toStringWithQualifier() {
    return toString(true);
  }
@Test
  public void testToStringWithQualifier() {
    Assert.assertEquals(
        "someimage:latest", ImageReference.of(null, "someimage", null).toStringWithQualifier());
    Assert.assertEquals(
        "someimage:latest", ImageReference.of("", "someimage", "").toStringWithQualifier());
    Assert.assertEquals(
        "someotherimage:latest",
        ImageReference.of(null, "library/someotherimage", null).toStringWithQualifier());
    Assert.assertEquals(
        "someregistry/someotherimage:latest",
        ImageReference.of("someregistry", "someotherimage", null).toStringWithQualifier());
    Assert.assertEquals(
        "anotherregistry/anotherimage:sometag",
        ImageReference.of("anotherregistry", "anotherimage", "sometag").toStringWithQualifier());
    Assert.assertEquals(
        "anotherregistry/anotherimage@sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
        ImageReference.of(
                "anotherregistry",
                "anotherimage",
                null,
                "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
            .toStringWithQualifier());
    Assert.assertEquals(
        "anotherregistry/anotherimage@sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
        ImageReference.of(
                "anotherregistry",
                "anotherimage",
                "sometag",
                "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
            .toStringWithQualifier());
  }