protected KBFolder addKBFolder(long parentResourcePrimKey)
      throws com.liferay.portal.kernel.exception.PortalException {

    ServiceContext serviceContext =
        ServiceContextTestUtil.getServiceContext(_group, _user.getUserId());

    return KBFolderLocalServiceUtil.addKBFolder(
        _user.getUserId(),
        _group.getGroupId(),
        PortalUtil.getClassNameId(KBFolderConstants.getClassName()),
        parentResourcePrimKey,
        RandomTestUtil.randomString(),
        RandomTestUtil.randomString(),
        serviceContext);
  }
  protected KBArticle addKBArticle(long parentKbFolderId, String title) throws Exception {

    ServiceContext serviceContext =
        ServiceContextTestUtil.getServiceContext(_group, _user.getUserId());

    return KBArticleLocalServiceUtil.addKBArticle(
        _user.getUserId(),
        PortalUtil.getClassNameId(KBFolderConstants.getClassName()),
        parentKbFolderId,
        title,
        title,
        RandomTestUtil.randomString(),
        RandomTestUtil.randomString(),
        null,
        new String[0],
        new String[0],
        serviceContext);
  }