void patchIngressClassName(Ingress current, Ingress desired) {
        if (desired.getSpec() != null
                && current.getSpec() != null
                && desired.getSpec().getIngressClassName() == null)   {
            desired.getSpec().setIngressClassName(current.getSpec().getIngressClassName());
        }
    }
@Test
    public void testIngressClassPatching()  {
        KubernetesClient client = mock(KubernetesClient.class);

        Ingress current = new IngressBuilder()
                .withNewMetadata()
                    .withNamespace(NAMESPACE)
                    .withName(RESOURCE_NAME)
                .endMetadata()
                .withNewSpec()
                    .withIngressClassName("nginx")
                    .withTls(new IngressTLSBuilder().withHosts("my-host").build())
                .endSpec()
                .build();

        Ingress desired = new IngressBuilder()
                .withNewMetadata()
                    .withNamespace(NAMESPACE)
                    .withName(RESOURCE_NAME)
                .endMetadata()
                .withNewSpec()
                    .withIngressClassName(null)
                    .withTls(new IngressTLSBuilder().withHosts("my-host").build())
                .endSpec()
                .build();

        IngressOperator op = new IngressOperator(vertx, client);
        op.patchIngressClassName(current, desired);

        assertThat(desired.getSpec().getIngressClassName(), is(current.getSpec().getIngressClassName()));
    }