@Test
  public void testUpdateExisting() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    DDMStructureLink newDDMStructureLink = _persistence.create(pk);

    newDDMStructureLink.setClassNameId(ServiceTestUtil.nextLong());

    newDDMStructureLink.setClassPK(ServiceTestUtil.nextLong());

    newDDMStructureLink.setStructureId(ServiceTestUtil.nextLong());

    _persistence.update(newDDMStructureLink);

    DDMStructureLink existingDDMStructureLink =
        _persistence.findByPrimaryKey(newDDMStructureLink.getPrimaryKey());

    Assert.assertEquals(
        existingDDMStructureLink.getStructureLinkId(), newDDMStructureLink.getStructureLinkId());
    Assert.assertEquals(
        existingDDMStructureLink.getClassNameId(), newDDMStructureLink.getClassNameId());
    Assert.assertEquals(existingDDMStructureLink.getClassPK(), newDDMStructureLink.getClassPK());
    Assert.assertEquals(
        existingDDMStructureLink.getStructureId(), newDDMStructureLink.getStructureId());
  }
  protected LayoutPrototype addLayoutPrototype() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    LayoutPrototype layoutPrototype = _persistence.create(pk);

    layoutPrototype.setMvccVersion(ServiceTestUtil.nextLong());

    layoutPrototype.setUuid(ServiceTestUtil.randomString());

    layoutPrototype.setCompanyId(ServiceTestUtil.nextLong());

    layoutPrototype.setUserId(ServiceTestUtil.nextLong());

    layoutPrototype.setUserName(ServiceTestUtil.randomString());

    layoutPrototype.setCreateDate(ServiceTestUtil.nextDate());

    layoutPrototype.setModifiedDate(ServiceTestUtil.nextDate());

    layoutPrototype.setName(ServiceTestUtil.randomString());

    layoutPrototype.setDescription(ServiceTestUtil.randomString());

    layoutPrototype.setSettings(ServiceTestUtil.randomString());

    layoutPrototype.setActive(ServiceTestUtil.randomBoolean());

    _persistence.update(layoutPrototype);

    return layoutPrototype;
  }
示例#3
0
  protected MDRRuleGroup addMDRRuleGroup() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    MDRRuleGroup mdrRuleGroup = _persistence.create(pk);

    mdrRuleGroup.setUuid(ServiceTestUtil.randomString());

    mdrRuleGroup.setGroupId(ServiceTestUtil.nextLong());

    mdrRuleGroup.setCompanyId(ServiceTestUtil.nextLong());

    mdrRuleGroup.setUserId(ServiceTestUtil.nextLong());

    mdrRuleGroup.setUserName(ServiceTestUtil.randomString());

    mdrRuleGroup.setCreateDate(ServiceTestUtil.nextDate());

    mdrRuleGroup.setModifiedDate(ServiceTestUtil.nextDate());

    mdrRuleGroup.setName(ServiceTestUtil.randomString());

    mdrRuleGroup.setDescription(ServiceTestUtil.randomString());

    _persistence.update(mdrRuleGroup, false);

    return mdrRuleGroup;
  }
  protected ShoppingCart addShoppingCart() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    ShoppingCart shoppingCart = _persistence.create(pk);

    shoppingCart.setGroupId(ServiceTestUtil.nextLong());

    shoppingCart.setCompanyId(ServiceTestUtil.nextLong());

    shoppingCart.setUserId(ServiceTestUtil.nextLong());

    shoppingCart.setUserName(ServiceTestUtil.randomString());

    shoppingCart.setCreateDate(ServiceTestUtil.nextDate());

    shoppingCart.setModifiedDate(ServiceTestUtil.nextDate());

    shoppingCart.setItemIds(ServiceTestUtil.randomString());

    shoppingCart.setCouponCodes(ServiceTestUtil.randomString());

    shoppingCart.setAltShipping(ServiceTestUtil.nextInt());

    shoppingCart.setInsure(ServiceTestUtil.randomBoolean());

    _persistence.update(shoppingCart);

    return shoppingCart;
  }
  @Test
  public void testUpdateExisting() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    ExpandoRow newExpandoRow = _persistence.create(pk);

    newExpandoRow.setCompanyId(ServiceTestUtil.nextLong());

    newExpandoRow.setModifiedDate(ServiceTestUtil.nextDate());

    newExpandoRow.setTableId(ServiceTestUtil.nextLong());

    newExpandoRow.setClassPK(ServiceTestUtil.nextLong());

    _persistence.update(newExpandoRow);

    ExpandoRow existingExpandoRow = _persistence.findByPrimaryKey(newExpandoRow.getPrimaryKey());

    Assert.assertEquals(existingExpandoRow.getRowId(), newExpandoRow.getRowId());
    Assert.assertEquals(existingExpandoRow.getCompanyId(), newExpandoRow.getCompanyId());
    Assert.assertEquals(
        Time.getShortTimestamp(existingExpandoRow.getModifiedDate()),
        Time.getShortTimestamp(newExpandoRow.getModifiedDate()));
    Assert.assertEquals(existingExpandoRow.getTableId(), newExpandoRow.getTableId());
    Assert.assertEquals(existingExpandoRow.getClassPK(), newExpandoRow.getClassPK());
  }
  protected Release addRelease() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    Release release = _persistence.create(pk);

    release.setMvccVersion(ServiceTestUtil.nextLong());

    release.setCreateDate(ServiceTestUtil.nextDate());

    release.setModifiedDate(ServiceTestUtil.nextDate());

    release.setServletContextName(ServiceTestUtil.randomString());

    release.setBuildNumber(ServiceTestUtil.nextInt());

    release.setBuildDate(ServiceTestUtil.nextDate());

    release.setVerified(ServiceTestUtil.randomBoolean());

    release.setState(ServiceTestUtil.nextInt());

    release.setTestString(ServiceTestUtil.randomString());

    _persistence.update(release);

    return release;
  }
  protected ShoppingItemPrice addShoppingItemPrice() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    ShoppingItemPrice shoppingItemPrice = _persistence.create(pk);

    shoppingItemPrice.setItemId(ServiceTestUtil.nextLong());

    shoppingItemPrice.setMinQuantity(ServiceTestUtil.nextInt());

    shoppingItemPrice.setMaxQuantity(ServiceTestUtil.nextInt());

    shoppingItemPrice.setPrice(ServiceTestUtil.nextDouble());

    shoppingItemPrice.setDiscount(ServiceTestUtil.nextDouble());

    shoppingItemPrice.setTaxable(ServiceTestUtil.randomBoolean());

    shoppingItemPrice.setShipping(ServiceTestUtil.nextDouble());

    shoppingItemPrice.setUseShippingFormula(ServiceTestUtil.randomBoolean());

    shoppingItemPrice.setStatus(ServiceTestUtil.nextInt());

    _persistence.update(shoppingItemPrice);

    return shoppingItemPrice;
  }
示例#8
0
  protected MBMailingList addMBMailingList() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    MBMailingList mbMailingList = _persistence.create(pk);

    mbMailingList.setUuid(ServiceTestUtil.randomString());

    mbMailingList.setGroupId(ServiceTestUtil.nextLong());

    mbMailingList.setCompanyId(ServiceTestUtil.nextLong());

    mbMailingList.setUserId(ServiceTestUtil.nextLong());

    mbMailingList.setUserName(ServiceTestUtil.randomString());

    mbMailingList.setCreateDate(ServiceTestUtil.nextDate());

    mbMailingList.setModifiedDate(ServiceTestUtil.nextDate());

    mbMailingList.setCategoryId(ServiceTestUtil.nextLong());

    mbMailingList.setEmailAddress(ServiceTestUtil.randomString());

    mbMailingList.setInProtocol(ServiceTestUtil.randomString());

    mbMailingList.setInServerName(ServiceTestUtil.randomString());

    mbMailingList.setInServerPort(ServiceTestUtil.nextInt());

    mbMailingList.setInUseSSL(ServiceTestUtil.randomBoolean());

    mbMailingList.setInUserName(ServiceTestUtil.randomString());

    mbMailingList.setInPassword(ServiceTestUtil.randomString());

    mbMailingList.setInReadInterval(ServiceTestUtil.nextInt());

    mbMailingList.setOutEmailAddress(ServiceTestUtil.randomString());

    mbMailingList.setOutCustom(ServiceTestUtil.randomBoolean());

    mbMailingList.setOutServerName(ServiceTestUtil.randomString());

    mbMailingList.setOutServerPort(ServiceTestUtil.nextInt());

    mbMailingList.setOutUseSSL(ServiceTestUtil.randomBoolean());

    mbMailingList.setOutUserName(ServiceTestUtil.randomString());

    mbMailingList.setOutPassword(ServiceTestUtil.randomString());

    mbMailingList.setAllowAnonymous(ServiceTestUtil.randomBoolean());

    mbMailingList.setActive(ServiceTestUtil.randomBoolean());

    _persistence.update(mbMailingList);

    return mbMailingList;
  }
  protected DLFileVersion addDLFileVersion() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    DLFileVersion dlFileVersion = _persistence.create(pk);

    dlFileVersion.setUuid(ServiceTestUtil.randomString());

    dlFileVersion.setGroupId(ServiceTestUtil.nextLong());

    dlFileVersion.setCompanyId(ServiceTestUtil.nextLong());

    dlFileVersion.setUserId(ServiceTestUtil.nextLong());

    dlFileVersion.setUserName(ServiceTestUtil.randomString());

    dlFileVersion.setCreateDate(ServiceTestUtil.nextDate());

    dlFileVersion.setModifiedDate(ServiceTestUtil.nextDate());

    dlFileVersion.setRepositoryId(ServiceTestUtil.nextLong());

    dlFileVersion.setFolderId(ServiceTestUtil.nextLong());

    dlFileVersion.setFileEntryId(ServiceTestUtil.nextLong());

    dlFileVersion.setTreePath(ServiceTestUtil.randomString());

    dlFileVersion.setExtension(ServiceTestUtil.randomString());

    dlFileVersion.setMimeType(ServiceTestUtil.randomString());

    dlFileVersion.setTitle(ServiceTestUtil.randomString());

    dlFileVersion.setDescription(ServiceTestUtil.randomString());

    dlFileVersion.setChangeLog(ServiceTestUtil.randomString());

    dlFileVersion.setExtraSettings(ServiceTestUtil.randomString());

    dlFileVersion.setFileEntryTypeId(ServiceTestUtil.nextLong());

    dlFileVersion.setVersion(ServiceTestUtil.randomString());

    dlFileVersion.setSize(ServiceTestUtil.nextLong());

    dlFileVersion.setChecksum(ServiceTestUtil.randomString());

    dlFileVersion.setStatus(ServiceTestUtil.nextInt());

    dlFileVersion.setStatusByUserId(ServiceTestUtil.nextLong());

    dlFileVersion.setStatusByUserName(ServiceTestUtil.randomString());

    dlFileVersion.setStatusDate(ServiceTestUtil.nextDate());

    _persistence.update(dlFileVersion);

    return dlFileVersion;
  }
 @Test
 public void testCountByG_FArrayable() {
   try {
     _persistence.countByG_F(
         ServiceTestUtil.nextLong(), new long[] {ServiceTestUtil.nextLong(), 0L});
   } catch (Exception e) {
     Assert.fail(e.getMessage());
   }
 }
  @Test
  public void testCountByC_L() {
    try {
      _persistence.countByC_L(ServiceTestUtil.nextLong(), ServiceTestUtil.nextLong());

      _persistence.countByC_L(0L, 0L);
    } catch (Exception e) {
      Assert.fail(e.getMessage());
    }
  }
  @Test
  public void testFetchByPrimaryKeyMissing() throws Exception {
    OrgGroupRolePK pk =
        new OrgGroupRolePK(
            ServiceTestUtil.nextLong(), ServiceTestUtil.nextLong(), ServiceTestUtil.nextLong());

    OrgGroupRole missingOrgGroupRole = _persistence.fetchByPrimaryKey(pk);

    Assert.assertNull(missingOrgGroupRole);
  }
  @Test
  public void testCountByG_U_F() {
    try {
      _persistence.countByG_U_F(
          ServiceTestUtil.nextLong(), ServiceTestUtil.nextLong(), ServiceTestUtil.randomBoolean());

      _persistence.countByG_U_F(0L, 0L, ServiceTestUtil.randomBoolean());
    } catch (Exception e) {
      Assert.fail(e.getMessage());
    }
  }
  @Test
  public void testCreate() throws Exception {
    OrgGroupRolePK pk =
        new OrgGroupRolePK(
            ServiceTestUtil.nextLong(), ServiceTestUtil.nextLong(), ServiceTestUtil.nextLong());

    OrgGroupRole orgGroupRole = _persistence.create(pk);

    Assert.assertNotNull(orgGroupRole);

    Assert.assertEquals(orgGroupRole.getPrimaryKey(), pk);
  }
  @Test
  public void testUpdateExisting() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    LayoutPrototype newLayoutPrototype = _persistence.create(pk);

    newLayoutPrototype.setMvccVersion(ServiceTestUtil.nextLong());

    newLayoutPrototype.setUuid(ServiceTestUtil.randomString());

    newLayoutPrototype.setCompanyId(ServiceTestUtil.nextLong());

    newLayoutPrototype.setUserId(ServiceTestUtil.nextLong());

    newLayoutPrototype.setUserName(ServiceTestUtil.randomString());

    newLayoutPrototype.setCreateDate(ServiceTestUtil.nextDate());

    newLayoutPrototype.setModifiedDate(ServiceTestUtil.nextDate());

    newLayoutPrototype.setName(ServiceTestUtil.randomString());

    newLayoutPrototype.setDescription(ServiceTestUtil.randomString());

    newLayoutPrototype.setSettings(ServiceTestUtil.randomString());

    newLayoutPrototype.setActive(ServiceTestUtil.randomBoolean());

    _persistence.update(newLayoutPrototype);

    LayoutPrototype existingLayoutPrototype =
        _persistence.findByPrimaryKey(newLayoutPrototype.getPrimaryKey());

    Assert.assertEquals(
        existingLayoutPrototype.getMvccVersion(), newLayoutPrototype.getMvccVersion());
    Assert.assertEquals(existingLayoutPrototype.getUuid(), newLayoutPrototype.getUuid());
    Assert.assertEquals(
        existingLayoutPrototype.getLayoutPrototypeId(), newLayoutPrototype.getLayoutPrototypeId());
    Assert.assertEquals(existingLayoutPrototype.getCompanyId(), newLayoutPrototype.getCompanyId());
    Assert.assertEquals(existingLayoutPrototype.getUserId(), newLayoutPrototype.getUserId());
    Assert.assertEquals(existingLayoutPrototype.getUserName(), newLayoutPrototype.getUserName());
    Assert.assertEquals(
        Time.getShortTimestamp(existingLayoutPrototype.getCreateDate()),
        Time.getShortTimestamp(newLayoutPrototype.getCreateDate()));
    Assert.assertEquals(
        Time.getShortTimestamp(existingLayoutPrototype.getModifiedDate()),
        Time.getShortTimestamp(newLayoutPrototype.getModifiedDate()));
    Assert.assertEquals(existingLayoutPrototype.getName(), newLayoutPrototype.getName());
    Assert.assertEquals(
        existingLayoutPrototype.getDescription(), newLayoutPrototype.getDescription());
    Assert.assertEquals(existingLayoutPrototype.getSettings(), newLayoutPrototype.getSettings());
    Assert.assertEquals(existingLayoutPrototype.getActive(), newLayoutPrototype.getActive());
  }
  @Test
  public void testCountByG_U_N() {
    try {
      _persistence.countByG_U_N(
          ServiceTestUtil.nextLong(), ServiceTestUtil.nextLong(), StringPool.BLANK);

      _persistence.countByG_U_N(0L, 0L, StringPool.NULL);

      _persistence.countByG_U_N(0L, 0L, (String) null);
    } catch (Exception e) {
      Assert.fail(e.getMessage());
    }
  }
  @Test
  public void testFindByPrimaryKeyMissing() throws Exception {
    OrgGroupRolePK pk =
        new OrgGroupRolePK(
            ServiceTestUtil.nextLong(), ServiceTestUtil.nextLong(), ServiceTestUtil.nextLong());

    try {
      _persistence.findByPrimaryKey(pk);

      Assert.fail("Missing entity did not throw NoSuchOrgGroupRoleException");
    } catch (NoSuchOrgGroupRoleException nsee) {
    }
  }
  protected OrgGroupRole addOrgGroupRole() throws Exception {
    OrgGroupRolePK pk =
        new OrgGroupRolePK(
            ServiceTestUtil.nextLong(), ServiceTestUtil.nextLong(), ServiceTestUtil.nextLong());

    OrgGroupRole orgGroupRole = _persistence.create(pk);

    orgGroupRole.setMvccVersion(ServiceTestUtil.nextLong());

    _persistence.update(orgGroupRole);

    return orgGroupRole;
  }
  @Test
  public void testDynamicQueryByPrimaryKeyMissing() throws Exception {
    DynamicQuery dynamicQuery =
        DynamicQueryFactoryUtil.forClass(OrgGroupRole.class, OrgGroupRole.class.getClassLoader());

    dynamicQuery.add(RestrictionsFactoryUtil.eq("id.organizationId", ServiceTestUtil.nextLong()));
    dynamicQuery.add(RestrictionsFactoryUtil.eq("id.groupId", ServiceTestUtil.nextLong()));
    dynamicQuery.add(RestrictionsFactoryUtil.eq("id.roleId", ServiceTestUtil.nextLong()));

    List<OrgGroupRole> result = _persistence.findWithDynamicQuery(dynamicQuery);

    Assert.assertEquals(0, result.size());
  }
  protected DDMStructureLink addDDMStructureLink() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    DDMStructureLink ddmStructureLink = _persistence.create(pk);

    ddmStructureLink.setClassNameId(ServiceTestUtil.nextLong());

    ddmStructureLink.setClassPK(ServiceTestUtil.nextLong());

    ddmStructureLink.setStructureId(ServiceTestUtil.nextLong());

    _persistence.update(ddmStructureLink);

    return ddmStructureLink;
  }
  @Test
  public void testUpdateExisting() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    Country newCountry = _persistence.create(pk);

    newCountry.setName(ServiceTestUtil.randomString());

    newCountry.setA2(ServiceTestUtil.randomString());

    newCountry.setA3(ServiceTestUtil.randomString());

    newCountry.setNumber(ServiceTestUtil.randomString());

    newCountry.setIdd(ServiceTestUtil.randomString());

    newCountry.setZipRequired(ServiceTestUtil.randomBoolean());

    newCountry.setActive(ServiceTestUtil.randomBoolean());

    _persistence.update(newCountry, false);

    Country existingCountry = _persistence.findByPrimaryKey(newCountry.getPrimaryKey());

    Assert.assertEquals(existingCountry.getCountryId(), newCountry.getCountryId());
    Assert.assertEquals(existingCountry.getName(), newCountry.getName());
    Assert.assertEquals(existingCountry.getA2(), newCountry.getA2());
    Assert.assertEquals(existingCountry.getA3(), newCountry.getA3());
    Assert.assertEquals(existingCountry.getNumber(), newCountry.getNumber());
    Assert.assertEquals(existingCountry.getIdd(), newCountry.getIdd());
    Assert.assertEquals(existingCountry.getZipRequired(), newCountry.getZipRequired());
    Assert.assertEquals(existingCountry.getActive(), newCountry.getActive());
  }
  @Test
  public void testUpdateExisting() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    ShoppingItemPrice newShoppingItemPrice = _persistence.create(pk);

    newShoppingItemPrice.setItemId(ServiceTestUtil.nextLong());

    newShoppingItemPrice.setMinQuantity(ServiceTestUtil.nextInt());

    newShoppingItemPrice.setMaxQuantity(ServiceTestUtil.nextInt());

    newShoppingItemPrice.setPrice(ServiceTestUtil.nextDouble());

    newShoppingItemPrice.setDiscount(ServiceTestUtil.nextDouble());

    newShoppingItemPrice.setTaxable(ServiceTestUtil.randomBoolean());

    newShoppingItemPrice.setShipping(ServiceTestUtil.nextDouble());

    newShoppingItemPrice.setUseShippingFormula(ServiceTestUtil.randomBoolean());

    newShoppingItemPrice.setStatus(ServiceTestUtil.nextInt());

    _persistence.update(newShoppingItemPrice);

    ShoppingItemPrice existingShoppingItemPrice =
        _persistence.findByPrimaryKey(newShoppingItemPrice.getPrimaryKey());

    Assert.assertEquals(
        existingShoppingItemPrice.getItemPriceId(), newShoppingItemPrice.getItemPriceId());
    Assert.assertEquals(existingShoppingItemPrice.getItemId(), newShoppingItemPrice.getItemId());
    Assert.assertEquals(
        existingShoppingItemPrice.getMinQuantity(), newShoppingItemPrice.getMinQuantity());
    Assert.assertEquals(
        existingShoppingItemPrice.getMaxQuantity(), newShoppingItemPrice.getMaxQuantity());
    AssertUtils.assertEquals(existingShoppingItemPrice.getPrice(), newShoppingItemPrice.getPrice());
    AssertUtils.assertEquals(
        existingShoppingItemPrice.getDiscount(), newShoppingItemPrice.getDiscount());
    Assert.assertEquals(existingShoppingItemPrice.getTaxable(), newShoppingItemPrice.getTaxable());
    AssertUtils.assertEquals(
        existingShoppingItemPrice.getShipping(), newShoppingItemPrice.getShipping());
    Assert.assertEquals(
        existingShoppingItemPrice.getUseShippingFormula(),
        newShoppingItemPrice.getUseShippingFormula());
    Assert.assertEquals(existingShoppingItemPrice.getStatus(), newShoppingItemPrice.getStatus());
  }
  @Test
  public void testUpdateExisting() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    ShoppingCart newShoppingCart = _persistence.create(pk);

    newShoppingCart.setGroupId(ServiceTestUtil.nextLong());

    newShoppingCart.setCompanyId(ServiceTestUtil.nextLong());

    newShoppingCart.setUserId(ServiceTestUtil.nextLong());

    newShoppingCart.setUserName(ServiceTestUtil.randomString());

    newShoppingCart.setCreateDate(ServiceTestUtil.nextDate());

    newShoppingCart.setModifiedDate(ServiceTestUtil.nextDate());

    newShoppingCart.setItemIds(ServiceTestUtil.randomString());

    newShoppingCart.setCouponCodes(ServiceTestUtil.randomString());

    newShoppingCart.setAltShipping(ServiceTestUtil.nextInt());

    newShoppingCart.setInsure(ServiceTestUtil.randomBoolean());

    _persistence.update(newShoppingCart);

    ShoppingCart existingShoppingCart =
        _persistence.findByPrimaryKey(newShoppingCart.getPrimaryKey());

    Assert.assertEquals(existingShoppingCart.getCartId(), newShoppingCart.getCartId());
    Assert.assertEquals(existingShoppingCart.getGroupId(), newShoppingCart.getGroupId());
    Assert.assertEquals(existingShoppingCart.getCompanyId(), newShoppingCart.getCompanyId());
    Assert.assertEquals(existingShoppingCart.getUserId(), newShoppingCart.getUserId());
    Assert.assertEquals(existingShoppingCart.getUserName(), newShoppingCart.getUserName());
    Assert.assertEquals(
        Time.getShortTimestamp(existingShoppingCart.getCreateDate()),
        Time.getShortTimestamp(newShoppingCart.getCreateDate()));
    Assert.assertEquals(
        Time.getShortTimestamp(existingShoppingCart.getModifiedDate()),
        Time.getShortTimestamp(newShoppingCart.getModifiedDate()));
    Assert.assertEquals(existingShoppingCart.getItemIds(), newShoppingCart.getItemIds());
    Assert.assertEquals(existingShoppingCart.getCouponCodes(), newShoppingCart.getCouponCodes());
    Assert.assertEquals(existingShoppingCart.getAltShipping(), newShoppingCart.getAltShipping());
    Assert.assertEquals(existingShoppingCart.getInsure(), newShoppingCart.getInsure());
  }
  @Test
  public void testFetchByPrimaryKeyMissing() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    VirtualHost missingVirtualHost = _persistence.fetchByPrimaryKey(pk);

    Assert.assertNull(missingVirtualHost);
  }
  protected VirtualHost addVirtualHost() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    VirtualHost virtualHost = _persistence.create(pk);

    virtualHost.setMvccVersion(ServiceTestUtil.nextLong());

    virtualHost.setCompanyId(ServiceTestUtil.nextLong());

    virtualHost.setLayoutSetId(ServiceTestUtil.nextLong());

    virtualHost.setHostname(ServiceTestUtil.randomString());

    _persistence.update(virtualHost);

    return virtualHost;
  }
  @Test
  public void testFetchByPrimaryKeyMissing() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    ExpandoRow missingExpandoRow = _persistence.fetchByPrimaryKey(pk);

    Assert.assertNull(missingExpandoRow);
  }
  protected ExpandoRow addExpandoRow() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    ExpandoRow expandoRow = _persistence.create(pk);

    expandoRow.setCompanyId(ServiceTestUtil.nextLong());

    expandoRow.setModifiedDate(ServiceTestUtil.nextDate());

    expandoRow.setTableId(ServiceTestUtil.nextLong());

    expandoRow.setClassPK(ServiceTestUtil.nextLong());

    _persistence.update(expandoRow);

    return expandoRow;
  }
  @Test
  public void testFetchByPrimaryKeyMissing() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    Country missingCountry = _persistence.fetchByPrimaryKey(pk);

    Assert.assertNull(missingCountry);
  }
  @Test
  public void testFetchByPrimaryKeyMissing() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    ShoppingItemPrice missingShoppingItemPrice = _persistence.fetchByPrimaryKey(pk);

    Assert.assertNull(missingShoppingItemPrice);
  }
  @Test
  public void testFetchByPrimaryKeyMissing() throws Exception {
    long pk = ServiceTestUtil.nextLong();

    DLFileVersion missingDLFileVersion = _persistence.fetchByPrimaryKey(pk);

    Assert.assertNull(missingDLFileVersion);
  }