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

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

    try (KubernetesClient client = new KubernetesClientBuilder().build()) {
      SharedInformerFactory sharedInformerFactory = client.informers();
      SharedIndexInformer<Dummy> podInformer = sharedInformerFactory.sharedIndexInformerFor(Dummy.class, 60 * 1000L);
      logger.info("Informer factory initialized.");

      podInformer.addEventHandler(
          new ResourceEventHandler<Dummy>() {
            @Override
            public void onAdd(Dummy pod) {
              logger.info("{} dummy added", pod.getMetadata().getName());
            }

            @Override
            public void onUpdate(Dummy oldPod, Dummy newPod) {
              logger.info("{} dummy updated", oldPod.getMetadata().getName());
            }

            @Override
            public void onDelete(Dummy pod, boolean deletedFinalStateUnknown) {
              logger.info("{} dummy deleted", pod.getMetadata().getName());
            }
          });

      podInformer.stopped().whenComplete((v, t) -> {
        if (t != null) {
          logger.error("Exception occurred, caught: {}", t.getMessage());
        }
      });

      logger.info("Starting all registered informers");
      sharedInformerFactory.startAllRegisteredInformers();

      Executors.newSingleThreadExecutor().submit(() -> {
        Thread.currentThread().setName("HAS_SYNCED_THREAD");
        try {
          for (;;) {
            logger.info("podInformer.hasSynced() : {}", podInformer.hasSynced());
            Thread.sleep(10 * 1000L);
          }
        } catch (InterruptedException inEx) {
          Thread.currentThread().interrupt();
          logger.warn("HAS_SYNCED_THREAD interrupted: {}", inEx.getMessage());
        }
      });

      final Dummy toCreate = new Dummy();
      toCreate.getMetadata().setName("dummy");
      if (client.getConfiguration().getNamespace() != null) {
        toCreate.getMetadata().setNamespace(client.getConfiguration().getNamespace());
      } else if (client.getNamespace() != null) {
        toCreate.getMetadata().setNamespace(client.getNamespace());
      } else {
        toCreate.getMetadata().setNamespace(client.namespaces().list().getItems().stream().findFirst()
            .map(HasMetadata::getMetadata).map(ObjectMeta::getNamespace).orElse("default"));
      }

      client.resources(Dummy.class).resource(toCreate).createOrReplace();
      // Wait for some time now
      TimeUnit.MINUTES.sleep(5);
      podInformer.close();
    } catch (InterruptedException interruptedException) {
      Thread.currentThread().interrupt();
      logger.warn("interrupted: {}", interruptedException.getMessage());
    }
  
<no_super_class>