code: private InputStream getResourceAsStream(String resource) {
      InputStream is = getClass().getResourceAsStream(resource);
      // switch needed for testability
      if (is == null) {
        try {
          is = new FileInputStream(new File(resource));
        } catch (FileNotFoundException e) {
          // do nothing
        }
      }
      if (is == null) {
        throw new SelendroidException("The resource '" + resource + "' was not found.");
      }
      return is;
    }
docs: Loads resources as stream and the main reason for having the method is because it can be use
  while testing and in production for loading files from within jar file.
  
  @param resource The resource to load.
  @return The input stream of the resource.
  @throws SelendroidException if resource was not found.