static String clusterNameFromLabel(HasMetadata resource)    {
        String clusterName = null;

        if (resource != null
                && resource.getMetadata() != null
                && resource.getMetadata().getLabels() != null) {
            clusterName = resource.getMetadata().getLabels().get(Labels.STRIMZI_CLUSTER_LABEL);
        }

        if (clusterName != null)    {
            return clusterName;
        } else {
            throw new RuntimeException("Failed to extract cluster name from Pod label");
        }
    }
@Test
    public void testClusterNameFromPodName() {
        assertThat(ReconcilerUtils.clusterNameFromLabel(new PodBuilder()
                .withNewMetadata()
                    .withName("my-cluster-new-brokers-1")
                    .withLabels(Map.of(Labels.STRIMZI_CLUSTER_LABEL, "my-cluster"))
                .endMetadata()
                .build()), is("my-cluster"));

        RuntimeException ex = assertThrows(RuntimeException.class, () -> ReconcilerUtils.clusterNameFromLabel(new PodBuilder()
                        .withNewMetadata()
                            .withName("my-cluster-new-brokers-1")
                        .endMetadata()
                        .build()));
        assertThat(ex.getMessage(), is("Failed to extract cluster name from Pod label"));
    }