static KafkaNodePoolTemplate convertTemplate(KafkaClusterTemplate template) {
        if (template != null)   {
            return new KafkaNodePoolTemplateBuilder()
                    .withPodSet(template.getPodSet())
                    .withPod(template.getPod())
                    .withPerPodService(template.getPerPodService())
                    .withPerPodRoute(template.getPerPodRoute())
                    .withPerPodIngress(template.getPerPodIngress())
                    .withPersistentVolumeClaim(template.getPersistentVolumeClaim())
                    .withKafkaContainer(template.getKafkaContainer())
                    .withInitContainer(template.getInitContainer())
                    .build();
        } else {
            return null;
        }
    }
@Test
    public void testConvertTemplateWithAllValues()  {
        KafkaClusterTemplate kafkaTemplate = new KafkaClusterTemplateBuilder()
                .withNewInitContainer()
                    .addToEnv(new ContainerEnvVarBuilder().withName("MY_INIT_ENV_VAR").withValue("my-init-env-var-value").build())
                .endInitContainer()
                .withNewKafkaContainer()
                    .addToEnv(new ContainerEnvVarBuilder().withName("MY_ENV_VAR").withValue("my-env-var-value").build())
                .endKafkaContainer()
                .withNewPod()
                    .withTmpDirSizeLimit("100Mi")
                .endPod()
                .withNewPodSet()
                    .withNewMetadata()
                        .addToAnnotations(Map.of("custom-podset-anno", "custom-podset-anno-value"))
                    .endMetadata()
                .endPodSet()
                .withNewPerPodService()
                    .withNewMetadata()
                        .addToAnnotations(Map.of("custom-service-anno", "custom-service-anno-value"))
                    .endMetadata()
                .endPerPodService()
                .withNewPerPodIngress()
                    .withNewMetadata()
                        .addToAnnotations(Map.of("custom-ingress-anno", "custom-ingress-anno-value"))
                    .endMetadata()
                .endPerPodIngress()
                .withNewPerPodRoute()
                    .withNewMetadata()
                        .addToAnnotations(Map.of("custom-route-anno", "custom-route-anno-value"))
                    .endMetadata()
                .endPerPodRoute()
                .withNewPersistentVolumeClaim()
                    .withNewMetadata()
                        .addToAnnotations(Map.of("custom-pvc-anno", "custom-pvc-anno-value"))
                    .endMetadata()
                .endPersistentVolumeClaim()
                .build();

        KafkaNodePoolTemplate template = VirtualNodePoolConverter.convertTemplate(kafkaTemplate);

        assertThat(template, is(notNullValue()));

        assertThat(template.getInitContainer(), is(notNullValue()));
        assertThat(template.getInitContainer().getEnv().size(), is(1));
        assertThat(template.getInitContainer().getEnv().get(0).getName(), is("MY_INIT_ENV_VAR"));
        assertThat(template.getInitContainer().getEnv().get(0).getValue(), is("my-init-env-var-value"));

        assertThat(template.getPodSet(), is(notNullValue()));
        assertThat(template.getPodSet().getMetadata().getAnnotations(), is(Map.of("custom-podset-anno", "custom-podset-anno-value")));

        assertThat(template.getPod(), is(notNullValue()));
        assertThat(template.getPod().getTmpDirSizeLimit(), is("100Mi"));

        assertThat(template.getPerPodService(), is(notNullValue()));
        assertThat(template.getPerPodService().getMetadata().getAnnotations(), is(Map.of("custom-service-anno", "custom-service-anno-value")));

        assertThat(template.getPerPodRoute(), is(notNullValue()));
        assertThat(template.getPerPodRoute().getMetadata().getAnnotations(), is(Map.of("custom-route-anno", "custom-route-anno-value")));

        assertThat(template.getPerPodIngress(), is(notNullValue()));
        assertThat(template.getPerPodIngress().getMetadata().getAnnotations(), is(Map.of("custom-ingress-anno", "custom-ingress-anno-value")));

        assertThat(template.getKafkaContainer(), is(notNullValue()));
        assertThat(template.getKafkaContainer().getEnv().size(), is(1));
        assertThat(template.getKafkaContainer().getEnv().get(0).getName(), is("MY_ENV_VAR"));
        assertThat(template.getKafkaContainer().getEnv().get(0).getValue(), is("my-env-var-value"));

        assertThat(template.getPersistentVolumeClaim(), is(notNullValue()));
        assertThat(template.getPersistentVolumeClaim().getMetadata().getAnnotations(), is(Map.of("custom-pvc-anno", "custom-pvc-anno-value")));
    }