class ImageStreamExample {

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

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

    try (OpenShiftClient client = new KubernetesClientBuilder().build().adapt(OpenShiftClient.class)) {
      final String project = Optional.ofNullable(client.getNamespace()).orElse("myproject");
      final String imageStreamName = "slave-jenkins";
      final ImageStream imageStream = client.imageStreams().inNamespace(project).resource(
          new ImageStreamBuilder()
              .withNewMetadata()
              .withName(imageStreamName)
              .endMetadata()
              .withNewSpec()
              .addToTags(0, new TagReferenceBuilder()
                  .withName("base")
                  .withFrom(new ObjectReferenceBuilder()
                      .withKind("DockerImage")
                      .withName("docker.io/openshift/jenkins-slave-maven-centos7:latest")
                      .build())
                  .build())
              .addToTags(1, new TagReferenceBuilder()
                  .addToAnnotations("role", "jenkins-slave")
                  .addToAnnotations("slave-label", "jenkins-slave")
                  .withName("latest")
                  .withFrom(new ObjectReferenceBuilder()
                      .withKind("ImageStreamTag")
                      .withName("base")
                      .build())
                  .build())
              .endSpec()
              .build())
          .create();
      logger.info("Created ImageStream: {}/{}", project, imageStream.getMetadata().getName());
      final ImageStream isFromServer = client.imageStreams().inNamespace(project).withName(imageStreamName).get();
      logger.info("Tags in ImageStream are:");
      logger.info(" -  {}", isFromServer.getSpec().getTags().get(0).getName());
      logger.info(" -  {}", isFromServer.getSpec().getTags().get(1).getName());

      logger.info("Deleting ImageStream");
      client.imageStreams().inNamespace(project).withName(imageStreamName).delete();
    }
  
<no_super_class>