code: public static Properties getProperties(final String propertiesPath) throws PropertiesException {
  
          Properties properties;
          String propertiesFilePath = getPropertiesFilePath(propertiesPath);
          if (propertiesFilePath == null) {
              throw new PropertiesException(String.format(
                      "Loading '%s' properties failed, no such properties.", propertiesPath));
          }
          FileInputStream fileInputStream = null;
          try {
              properties = new Properties();
              fileInputStream = new FileInputStream(propertiesFilePath);
              properties.load(fileInputStream);
              fileInputStream.close();
              return properties;
          } catch (Exception e) {
              try {
                  if (fileInputStream != null)
                      fileInputStream.close();
              } catch (IOException e1) {
                  e1.printStackTrace();
              }
              throw new PropertiesException(String.format("Loading '%s' properties failed.",
                      propertiesPath), e);
          }
      }
docs: Returns properties by given path.<br>
  <p>
  e.g:<br>
  "testFolder/propertiesName" or "testFolder/propertiesName.properties"
  </p>
  
  @param propertiesPath
  the properties path.
  @return properties by given path.
  @throws PropertiesException