code: private static ConfigProvider<Configuration> getProviderByFileExtention(String extention) throws ConfigurationException {
          ConfigProvider<Configuration> provider;
          if (XML_EXTENTION.equals(extention)) {
              provider = new XMLConfigProvider<>(Configuration.class);
          } else if (YML_EXTENTION.equals(extention) || YAML_EXTENTION.equals(extention)) {
              provider = new YAMLConfigProvider<>(Configuration.class);
          } else {
              throw new ConfigurationException("Given file type is not supported.",
                      CONFIG_EXTENTION_NOT_SUPPORTED_EXCEPTION_ID);
          }
  
          return provider;
      }
docs: Gets the provider by file extention.
  
  @param extention
  the extention
  @return the provider by file extention
  @throws ConfigurationException