public int getReplicas() {
        final int replicas =
                flinkConfig.get(KubernetesConfigOptions.KUBERNETES_JOBMANAGER_REPLICAS);
        if (replicas < 1) {
            throw new IllegalConfigurationException(
                    String.format(
                            "'%s' should not be configured less than one.",
                            KubernetesConfigOptions.KUBERNETES_JOBMANAGER_REPLICAS.key()));
        } else if (replicas > 1
                && !HighAvailabilityMode.isHighAvailabilityModeActivated(flinkConfig)) {
            throw new IllegalConfigurationException(
                    "High availability should be enabled when starting standby JobManagers.");
        }
        return replicas;
    }
@Test
    void testGetReplicas() {
        flinkConfig.set(HighAvailabilityOptions.HA_MODE, HighAvailabilityMode.KUBERNETES.name());
        flinkConfig.set(KubernetesConfigOptions.KUBERNETES_JOBMANAGER_REPLICAS, 2);
        assertThat(kubernetesJobManagerParameters.getReplicas()).isEqualTo(2);
    }