@Before
  @Override
  public void setUp() throws Exception {
    ServiceTestUtil.setUser(TestPropsValues.getUser());

    super.setUp();
  }
  @Before
  public void setUp() throws Exception {
    ServiceTestUtil.setUser(TestPropsValues.getUser());

    ServiceContext serviceContext = ServiceContextTestUtil.getServiceContext();

    _repository =
        RepositoryLocalServiceUtil.addRepository(
            TestPropsValues.getUserId(),
            TestPropsValues.getGroupId(),
            ClassNameLocalServiceUtil.getClassNameId(_REPOSITORY_CLASS_NAME),
            DLFolderConstants.DEFAULT_PARENT_FOLDER_ID,
            StringUtil.randomString(),
            StringUtil.randomString(),
            StringUtil.randomString(),
            new UnicodeProperties(),
            true,
            serviceContext);

    _repositoryEntry =
        RepositoryEntryLocalServiceUtil.createRepositoryEntry(_repository.getDlFolderId());

    _repositoryEntry.setUuid(serviceContext.getUuid());
    _repositoryEntry.setGroupId(serviceContext.getScopeGroupId());
    _repositoryEntry.setCompanyId(serviceContext.getCompanyId());
    _repositoryEntry.setUserId(serviceContext.getUserId());
    _repositoryEntry.setUserName(StringUtil.randomString());
    _repositoryEntry.setCreateDate(serviceContext.getCreateDate(null));
    _repositoryEntry.setModifiedDate(serviceContext.getModifiedDate(null));
    _repositoryEntry.setRepositoryId(_repository.getRepositoryId());
    _repositoryEntry.setMappedId(_MAPPED_ID);

    RepositoryEntryLocalServiceUtil.addRepositoryEntry(_repositoryEntry);
  }
  @Before
  @Override
  public void setUp() throws Exception {
    _testMode = PortalRunMode.isTestMode();

    PortalRunMode.setTestMode(true);

    ServiceTestUtil.setUser(TestPropsValues.getUser());

    super.setUp();
  }
  @Before
  public void setUp() throws Exception {
    group = GroupTestUtil.addGroup();
    user = UserTestUtil.addUser();

    serviceContext = ServiceContextTestUtil.getServiceContext(group.getGroupId());

    doSetUp();

    ServiceTestUtil.setUser(user);

    permissionChecker = PermissionThreadLocal.getPermissionChecker();

    addPortletModelViewPermission();
  }
  @After
  public void tearDown() throws Exception {
    ServiceTestUtil.setUser(TestPropsValues.getUser());

    removePortletModelViewPermission();
  }