public void validate(DataConnectionConfig dataConnectionConfig) {
        int numberOfSetItems = getNumberOfSetItems(dataConnectionConfig, CLIENT_XML_PATH, CLIENT_YML_PATH, CLIENT_XML,
                CLIENT_YML);
        if (numberOfSetItems != 1) {
            throw new HazelcastException("HazelcastDataConnection with name '" + dataConnectionConfig.getName()
                                         + "' could not be created, "
                                         + "provide either a file path with one of "
                                         + "\"client_xml_path\" or \"client_yml_path\" properties "
                                         + "or a string content with one of \"client_xml\" or \"client_yml\" properties "
                                         + "for the client configuration.");
        }
    }
@Test
    public void testValidateOnlyString() {
        DataConnectionConfig dataConnectionConfig = new DataConnectionConfig();
        dataConnectionConfig.setProperty(HazelcastDataConnection.CLIENT_XML, "xml");

        HazelcastDataConnectionConfigValidator validator = new HazelcastDataConnectionConfigValidator();

        assertThatCode(() -> validator.validate(dataConnectionConfig))
                .doesNotThrowAnyException();
    }