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

  private static final String NAMESPACE = "template-example-ns";
  private static final String TEST_TEMPLATE_RESOURCE = "/test-template.yml";
  private static final String DEFAULT_NAME_OF_TEMPLATE = "eap6-basic-sti";

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

    try (OpenShiftClient client = new KubernetesClientBuilder().build().adapt(OpenShiftClient.class)) {
      try {
        logger.info("Creating temporary project '{}' for example", NAMESPACE);
        client.projectrequests().create(
            new ProjectRequestBuilder()
                .withNewMetadata()
                .withName(NAMESPACE)
                .endMetadata()
                .build());
        logger.info("Created project: {}", NAMESPACE);

        final Template loadedTemplate = client.templates()
            .load(TemplateExample.class.getResourceAsStream(TEST_TEMPLATE_RESOURCE)).item();
        for (Parameter p : loadedTemplate.getParameters()) {
          final String required = Boolean.TRUE.equals(p.getRequired()) ? "*" : "";
          logger.info("Loaded parameter from template: {}{} - '{}' ({})",
              p.getName(), required, p.getValue(), p.getGenerate());
        }

        final Template serverUploadedTemplate = client.templates()
            .inNamespace(NAMESPACE)
            .load(TemplateExample.class.getResourceAsStream(TEST_TEMPLATE_RESOURCE))
            .create();
        logger.info("Template {} successfully created on server", serverUploadedTemplate.getMetadata().getName());
        final Template serverDownloadedTemplate = client.templates().inNamespace(NAMESPACE).withName(DEFAULT_NAME_OF_TEMPLATE)
            .get();
        logger.info("Template {} successfully downloaded from server", serverDownloadedTemplate.getMetadata().getName());

        final KubernetesList processedTemplateWithDefaultParameters = client.templates()
            .inNamespace(NAMESPACE).withName(DEFAULT_NAME_OF_TEMPLATE).process();
        logger.info("Template {} successfully processed to list with {} items, and requiredBoolean = {}",
            processedTemplateWithDefaultParameters.getItems().get(0).getMetadata().getLabels().get("template"),
            processedTemplateWithDefaultParameters.getItems().size(),
            processedTemplateWithDefaultParameters.getItems().get(0).getMetadata().getLabels().get("requiredBoolean"));

        final KubernetesList processedTemplateWithCustomParameters = client.templates()
            .inNamespace(NAMESPACE).withName(DEFAULT_NAME_OF_TEMPLATE)
            .process(Collections.singletonMap("REQUIRED_BOOLEAN", "true"));
        logger.info("Template {} successfully processed to list with {} items, and requiredBoolean = {}",
            processedTemplateWithCustomParameters.getItems().get(0).getMetadata().getLabels().get("template"),
            processedTemplateWithCustomParameters.getItems().size(),
            processedTemplateWithCustomParameters.getItems().get(0).getMetadata().getLabels().get("requiredBoolean"));

        List<HasMetadata> l = client.load(TemplateExample.class.getResourceAsStream("/test-list.yml")).items();
        logger.info("{}", l.size());

        final boolean templateDeleted = client.templates().inNamespace(NAMESPACE).withName(DEFAULT_NAME_OF_TEMPLATE).delete()
            .size() == 1;
        logger.info("Template {} was {}deleted", DEFAULT_NAME_OF_TEMPLATE, templateDeleted ? "" : "**NOT** ");
        client.load(TemplateExample.class.getResourceAsStream("/test-list.yml")).inNamespace(NAMESPACE).create();
      } finally {
        // And finally clean up the namespace
        client.projects().withName(NAMESPACE).delete();
        logger.info("Deleted project {}", NAMESPACE);
      }
    }
  
<no_super_class>