@SuppressWarnings({"checkstyle:ParameterNumber"})
    public static Pod createStatefulPod(
            Reconciliation reconciliation,
            String name,
            String namespace,
            Labels labels,
            String strimziPodSetName,
            String serviceAccountName,
            PodTemplate template,
            Map<String, String> defaultPodLabels,
            Map<String, String> podAnnotations,
            String headlessServiceName,
            Affinity affinity,
            List<Container> initContainers,
            List<Container> containers,
            List<Volume> volumes,
            List<LocalObjectReference> defaultImagePullSecrets,
            PodSecurityContext podSecurityContext
    ) {
        Pod pod = new PodBuilder()
                .withNewMetadata()
                    .withName(name)
                    .withLabels(labels.withStrimziPodName(name).withStatefulSetPod(name).withStrimziPodSetController(strimziPodSetName).withAdditionalLabels(Util.mergeLabelsOrAnnotations(defaultPodLabels, TemplateUtils.labels(template))).toMap())
                    .withNamespace(namespace)
                    .withAnnotations(Util.mergeLabelsOrAnnotations(podAnnotations, TemplateUtils.annotations(template)))
                .endMetadata()
                .withNewSpec()
                    .withRestartPolicy("Always")
                    .withHostname(name)
                    .withSubdomain(headlessServiceName)
                    .withServiceAccountName(serviceAccountName)
                    .withEnableServiceLinks(template != null ? template.getEnableServiceLinks() : null)
                    .withAffinity(affinity)
                    .withInitContainers(initContainers)
                    .withContainers(containers)
                    .withVolumes(volumes)
                    .withTolerations(template != null && template.getTolerations() != null ? template.getTolerations() : null)
                    .withTerminationGracePeriodSeconds(template != null ? (long) template.getTerminationGracePeriodSeconds() : 30L)
                    .withImagePullSecrets(imagePullSecrets(template, defaultImagePullSecrets))
                    .withSecurityContext(podSecurityContext)
                    .withPriorityClassName(template != null ? template.getPriorityClassName() : null)
                    .withSchedulerName(template != null && template.getSchedulerName() != null ? template.getSchedulerName() : "default-scheduler")
                    .withHostAliases(template != null ? template.getHostAliases() : null)
                    .withTopologySpreadConstraints(template != null ? template.getTopologySpreadConstraints() : null)
                .endSpec()
                .build();

        // Set the pod revision annotation
        pod.getMetadata().getAnnotations().put(PodRevision.STRIMZI_REVISION_ANNOTATION, PodRevision.getRevision(reconciliation, pod));

        return pod;
    }
@Test
    public void testCreateStatefulPodWithNullValuesAndNullTemplate()  {
        Pod pod = WorkloadUtils.createStatefulPod(
                Reconciliation.DUMMY_RECONCILIATION,
                NAME + "-0",    // => Pod name
                NAMESPACE,
                LABELS,
                NAME,   // => Workload name
                NAME + "-sa",   // => Service Account name
                null,
                Map.of("default-label", "default-value"),
                Map.of("extra", "annotations"),
                HEADLESS_SERVICE_NAME,
                DEFAULT_AFFINITY,
                List.of(new ContainerBuilder().withName("init-container").build()),
                List.of(new ContainerBuilder().withName("container").build()),
                VolumeUtils.createPodSetVolumes(NAME + "-0", DEFAULT_STORAGE, false),
                List.of(new LocalObjectReference("some-pull-secret")),
                DEFAULT_POD_SECURITY_CONTEXT
        );

        assertThat(pod.getMetadata().getName(), is(NAME + "-0"));
        assertThat(pod.getMetadata().getNamespace(), is(NAMESPACE));
        assertThat(pod.getMetadata().getLabels(), is(LABELS
                .withStrimziPodSetController(NAME)
                .withStrimziPodName(NAME + "-0")
                .withAdditionalLabels(Map.of("statefulset.kubernetes.io/pod-name", "my-workload-0", "default-label", "default-value"))
                .toMap()));
        assertThat(pod.getMetadata().getAnnotations(), is(Map.of("extra", "annotations", PodRevision.STRIMZI_REVISION_ANNOTATION, "da09ff49")));

        assertThat(pod.getSpec().getRestartPolicy(), is("Always"));
        assertThat(pod.getSpec().getHostname(), is(NAME + "-0"));
        assertThat(pod.getSpec().getServiceAccountName(), is(NAME + "-sa"));
        assertThat(pod.getSpec().getEnableServiceLinks(), is(nullValue()));
        assertThat(pod.getSpec().getAffinity(), is(DEFAULT_AFFINITY));
        assertThat(pod.getSpec().getInitContainers().size(), is(1));
        assertThat(pod.getSpec().getInitContainers().get(0).getName(), is("init-container"));
        assertThat(pod.getSpec().getContainers().size(), is(1));
        assertThat(pod.getSpec().getContainers().get(0).getName(), is("container"));
        assertThat(pod.getSpec().getVolumes(), is(VolumeUtils.createPodSetVolumes(NAME + "-0", DEFAULT_STORAGE, false)));
        assertThat(pod.getSpec().getTolerations(), is(nullValue()));
        assertThat(pod.getSpec().getTerminationGracePeriodSeconds(), is(30L));
        assertThat(pod.getSpec().getImagePullSecrets(), is(List.of(new LocalObjectReference("some-pull-secret"))));
        assertThat(pod.getSpec().getSecurityContext(), is(DEFAULT_POD_SECURITY_CONTEXT));
        assertThat(pod.getSpec().getPriorityClassName(), is(nullValue()));
        assertThat(pod.getSpec().getSchedulerName(), is("default-scheduler"));
        assertThat(pod.getSpec().getHostAliases(), is(nullValue()));
        assertThat(pod.getSpec().getTopologySpreadConstraints(), is(nullValue()));
    }