/**
  * Return a test genre.
  * @param $genreId integer
  * @return Genre the test genre.
  */
 public function getTestGenre($genreId)
 {
     // Create a test genre.
     switch ($genreId) {
         case SUBMISSION_FILE_DAO_TEST_DOC_GENRE_ID:
             $category = GENRE_CATEGORY_DOCUMENT;
             $name = 'Document Genre';
             $designation = 'D';
             break;
         case SUBMISSION_FILE_DAO_TEST_ART_GENRE_ID:
             $category = GENRE_CATEGORY_ARTWORK;
             $name = 'Artwork Genre';
             $designation = 'A';
             break;
         default:
             self::fail();
     }
     $genre = new Genre();
     $application = PKPApplication::getApplication();
     $request = $application->getRequest();
     $press = $request->getContext();
     $genre->setContextId($press->getId());
     $genre->setId($genreId);
     $genre->setName($name, 'en_US');
     $genre->setDesignation($designation);
     $genre->setCategory($category);
     return $genre;
 }