@Test(expected = RepositoryException.class)
  public void testCreateRepositoryFromNonexistentRepositoryId() throws Exception {

    long repositoryId = RandomTestUtil.randomLong();

    RepositoryLocalServiceUtil.getRepositoryImpl(repositoryId);
  }
  @Test
  public void testCreateRepositoryFromExistingRepositoryId() throws Exception {

    DLFolder dlFolder = DLTestUtil.addDLFolder(_group.getGroupId());

    RepositoryLocalServiceUtil.getRepositoryImpl(dlFolder.getRepositoryId());
  }
  @Test(expected = NoSuchRepositoryEntryException.class)
  public void testCreateRepositoryFromNonexistentFileVersionId() throws Exception {

    long fileVersionId = RandomTestUtil.randomLong();

    RepositoryLocalServiceUtil.getRepositoryImpl(0, 0, fileVersionId);
  }
  @Test
  public void testCreateRepositoryFromExistingFileEntryId() throws Exception {
    DLFolder dlFolder = DLTestUtil.addDLFolder(_group.getGroupId());

    DLFileEntry dlFileEntry = DLTestUtil.addDLFileEntry(dlFolder.getFolderId());

    RepositoryLocalServiceUtil.getRepositoryImpl(0, dlFileEntry.getFileEntryId(), 0);
  }