class ImageStreamTagExample {

  private static final Logger logger = LoggerFactory.getLogger(ImageStreamTagExample.class);

  public static void main(String[] args) throws InterruptedException {<FILL_FUNCTION_BODY>}
}


    try (OpenShiftClient client = new KubernetesClientBuilder().build().adapt(OpenShiftClient.class)) {
      final String project = Optional.ofNullable(client.getNamespace()).orElse("myproject");
      final String isTagName = "bar1:1.0.12";
      final ImageStreamTag isTag = client.imageStreamTags().inNamespace(project).resource(
          new ImageStreamTagBuilder().withNewMetadata().withName(isTagName).endMetadata()
              .withNewTag().withNewFrom().withKind("DockerImage").withName("openshift/wildfly-81-centos7:latest").endFrom()
              .endTag()
              .build())
          .createOrReplace();
      logger.info("Created ImageStreamTag: {}", isTag.getMetadata().getName());
      int limit = 0;
      while (client.imageStreamTags().inNamespace(project).withName(isTagName).get() == null && limit++ < 10) {
        TimeUnit.SECONDS.sleep(1);
      }
      logger.info("ImageStreamTags in {}:", project);
      client.imageStreamTags().inNamespace(project).list().getItems()
          .forEach(ist -> logger.info(" - {}", ist.getMetadata().getName()));
      final boolean deletedIsTag = client.imageStreamTags().withName(isTagName).delete().size() == 1;
      logger.info("Deleted ImageStreamTag: {}", deletedIsTag);
    }
  
<no_super_class>