code: File getResultsFile(String mediaType, String outputDirectory) throws FileNotFoundException {
      	 // split out any media type parameters
          String contentType = mediaType.split(";")[0];
          String fileName = null;
          if(contentType.endsWith("rdf+xml") || contentType.endsWith("rdf+earl")){
          	fileName = "earl-results.rdf";
          } else if(contentType.endsWith("zip")){
          	
          File htmlResult = HtmlReport.getHtmlResultZip(outputDirectory);
          fileName = "result.zip";
          } else{
          	fileName = "report_logs.xml";
          }
          File resultsFile = new File(outputDirectory, fileName);
          if (!resultsFile.exists()) {
              throw new FileNotFoundException("Test run results not found at " + resultsFile.getAbsolutePath());
          }
          return resultsFile;
      }
docs: Returns the test results in the specified format. The default media type
  is "application/xml", but "application/rdf+xml" (RDF/XML) is also
  supported.
  
  @param mediaType
  The media type of the test results (XML or RDF/XML).
  @param outputDirectory
  The directory containing the test run output.
  @return A File containing the test results.
  @throws FileNotFoundException
  If no test results are found.