@Test
public void testValidImagePasses() {

  assertThat(validator.validateImageReference("repo"), is(empty()));
  assertThat(validator.validateImageReference("namespace/repo"), is(empty()));
  assertThat(validator.validateImageReference("namespace/repo:tag"), is(empty()));
  assertThat(validator.validateImageReference("namespace/repo:1.2"), is(empty()));
  assertThat(validator.validateImageReference("reg.istry:4711/repo"), is(empty()));
  assertThat(validator.validateImageReference("reg.istry.:4711/repo"), is(empty()));
  assertThat(validator.validateImageReference("reg.istry:4711/namespace/repo"),
      is(empty()));
  assertThat(validator.validateImageReference("reg.istry.:4711/namespace/repo"),
      is(empty()));
  assertThat(validator.validateImageReference("1.2.3.4:4711/namespace/repo"), is(empty()));
  assertThat(validator.validateImageReference("registry.test.net:80/fooo/bar"),
      is(empty()));
  assertThat(validator.validateImageReference("registry.test.net.:80/fooo/bar"),
      is(empty()));
  assertThat(validator.validateImageReference(
      "namespace/foo@sha256:2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae"
  ), is(empty()));
  assertThat(validator.validateImageReference(
      "foo.net/bar@sha256:2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae"
  ), is(empty()));
  assertThat(validator.validateImageReference(
      "foo@tarsum.v1+sha256:6c3c624b58dbbcd3c0dd82b4c53f04194d1247c6eebdaab7c610cf7d66709b3b"
  ), is(empty()));
  assertThat(validator.validateImageReference(
      "baz.io/foo/foo-bar:1.2.3-SNAPSHOT-20170830T143321-decafbad@sha256:2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae"
  ), is(empty()));
  assertThat(validator.validateImageReference(
      "baz.io:4711/foo/foo-bar:1.2.3-SNAPSHOT-20170830T143321-decafbad@sha256:2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae"
  ), is(empty()));
}