private static ClientHighAvailabilityServices createCustomClientHAServices(Configuration config)
            throws FlinkException {
        return createCustomClientHAServices(config.get(HighAvailabilityOptions.HA_MODE), config);
    }
@Test
    public void testCreateCustomClientHAServices() throws Exception {
        Configuration config = new Configuration();

        ClientHighAvailabilityServices clientHAServices =
                TestingClientHAServices.createClientHAServices();
        TestHAFactory.clientHAServices = clientHAServices;

        config.set(HighAvailabilityOptions.HA_MODE, TestHAFactory.class.getName());

        // when
        ClientHighAvailabilityServices actualClientHAServices =
                HighAvailabilityServicesUtils.createClientHAService(
                        config, NoOpFatalErrorHandler.INSTANCE);

        // then
        assertSame(clientHAServices, actualClientHAServices);
    }