bigtop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnowl...@apache.org
Subject [04/11] bigtop git commit: BIGTOP-1984. Extract samplers library from BigPetStore data generator
Date Tue, 25 Aug 2015 14:21:38 GMT
http://git-wip-us.apache.org/repos/asf/bigtop/blob/15af83eb/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/products/rules/TestAlwaysTrueRule.java
----------------------------------------------------------------------
diff --git a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/products/rules/TestAlwaysTrueRule.java b/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/products/rules/TestAlwaysTrueRule.java
deleted file mode 100644
index c32fa1b..0000000
--- a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/products/rules/TestAlwaysTrueRule.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.bigtop.bigpetstore.datagenerator.generators.products.rules;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-public class TestAlwaysTrueRule
-{
-
-	@Test
-	public void testRuleMatches()
-	{
-		Rule rule = new AlwaysTrueRule();
-		Assert.assertTrue(rule.ruleMatches(null));
-	}
-}

http://git-wip-us.apache.org/repos/asf/bigtop/blob/15af83eb/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/products/rules/TestAndRule.java
----------------------------------------------------------------------
diff --git a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/products/rules/TestAndRule.java b/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/products/rules/TestAndRule.java
deleted file mode 100644
index b930c38..0000000
--- a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/products/rules/TestAndRule.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.bigtop.bigpetstore.datagenerator.generators.products.rules;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-public class TestAndRule
-{
-
-	@Test
-	public void testRuleMatches()
-	{
-		Rule rule = new AndRule(
-				new AlwaysTrueRule(),
-				new AlwaysTrueRule());
-		Assert.assertTrue(rule.ruleMatches(null));
-		
-		rule = new AndRule(
-				new AlwaysTrueRule(),
-				new NotRule(
-						new AlwaysTrueRule()));
-		Assert.assertFalse(rule.ruleMatches(null));
-		
-		rule = new AndRule(
-				new NotRule(
-						new AlwaysTrueRule()),
-				new AlwaysTrueRule());
-		Assert.assertFalse(rule.ruleMatches(null));
-		
-		rule = new AndRule(
-				new NotRule(
-						new AlwaysTrueRule()),
-				new NotRule(
-						new AlwaysTrueRule()));
-		Assert.assertFalse(rule.ruleMatches(null));
-	}
-}

http://git-wip-us.apache.org/repos/asf/bigtop/blob/15af83eb/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/products/rules/TestFieldPredicate.java
----------------------------------------------------------------------
diff --git a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/products/rules/TestFieldPredicate.java b/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/products/rules/TestFieldPredicate.java
deleted file mode 100644
index 88cae45..0000000
--- a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/products/rules/TestFieldPredicate.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.bigtop.bigpetstore.datagenerator.generators.products.rules;
-
-import java.util.Map;
-
-import org.apache.bigtop.bigpetstore.datagenerator.datamodels.Product;
-import org.junit.Assert;
-import org.junit.Test;
-
-import com.google.common.collect.ImmutableMap;
-
-public class TestFieldPredicate
-{
-
-	@Test
-	public void testRuleMatches()
-	{
-		Map<String, Object> fields = ImmutableMap.of("brand", (Object) "Chef Corgi",
-				"flavor", (Object) "chicken");
-		Product product = new Product(fields);
-		
-		Rule rule = new FieldPredicate("brand", "Chef Corgi");
-		Assert.assertTrue(rule.ruleMatches(product));
-		
-		rule = new FieldPredicate("brand", "Happy Pup");
-		Assert.assertFalse(rule.ruleMatches(product));
-	}
-}

http://git-wip-us.apache.org/repos/asf/bigtop/blob/15af83eb/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/products/rules/TestNotRule.java
----------------------------------------------------------------------
diff --git a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/products/rules/TestNotRule.java b/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/products/rules/TestNotRule.java
deleted file mode 100644
index ee284af..0000000
--- a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/products/rules/TestNotRule.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.bigtop.bigpetstore.datagenerator.generators.products.rules;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-public class TestNotRule
-{
-
-	@Test
-	public void testRuleMatches()
-	{
-		Rule rule = new NotRule(
-				new AlwaysTrueRule());
-		Assert.assertFalse(rule.ruleMatches(null));
-		
-		rule = new NotRule(
-				new NotRule(
-						new AlwaysTrueRule()));
-		Assert.assertTrue(rule.ruleMatches(null));
-	}
-}

http://git-wip-us.apache.org/repos/asf/bigtop/blob/15af83eb/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/products/rules/TestOrRule.java
----------------------------------------------------------------------
diff --git a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/products/rules/TestOrRule.java b/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/products/rules/TestOrRule.java
deleted file mode 100644
index fd6f817..0000000
--- a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/products/rules/TestOrRule.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.bigtop.bigpetstore.datagenerator.generators.products.rules;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-public class TestOrRule
-{
-
-	@Test
-	public void testRuleMatches()
-	{
-		Rule rule = new OrRule(
-				new AlwaysTrueRule(),
-				new AlwaysTrueRule());
-		Assert.assertTrue(rule.ruleMatches(null));
-		
-		rule = new OrRule(
-				new AlwaysTrueRule(),
-				new NotRule(
-						new AlwaysTrueRule()));
-		Assert.assertTrue(rule.ruleMatches(null));
-		
-		rule = new OrRule(
-				new NotRule(
-						new AlwaysTrueRule()),
-				new AlwaysTrueRule());
-		Assert.assertTrue(rule.ruleMatches(null));
-		
-		rule = new OrRule(
-				new NotRule(
-						new AlwaysTrueRule()),
-				new NotRule(
-						new AlwaysTrueRule()));
-		Assert.assertFalse(rule.ruleMatches(null));
-	}
-}

http://git-wip-us.apache.org/repos/asf/bigtop/blob/15af83eb/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/purchase/TestProductCategoryMarkovModelSampler.java
----------------------------------------------------------------------
diff --git a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/purchase/TestProductCategoryMarkovModelSampler.java b/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/purchase/TestProductCategoryMarkovModelSampler.java
deleted file mode 100644
index acb0929..0000000
--- a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/purchase/TestProductCategoryMarkovModelSampler.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.bigtop.bigpetstore.datagenerator.generators.purchase;
-
-import java.util.List;
-import java.util.Map;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import org.apache.bigtop.bigpetstore.datagenerator.Constants;
-import org.apache.bigtop.bigpetstore.datagenerator.datamodels.PetSpecies;
-import org.apache.bigtop.bigpetstore.datagenerator.datamodels.Product;
-import org.apache.bigtop.bigpetstore.datagenerator.datamodels.inputs.ProductCategory;
-import org.apache.bigtop.bigpetstore.datagenerator.framework.SeedFactory;
-import org.apache.bigtop.bigpetstore.datagenerator.framework.markovmodels.MarkovModel;
-import org.apache.bigtop.bigpetstore.datagenerator.framework.samplers.Sampler;
-import org.apache.bigtop.bigpetstore.datagenerator.framework.samplers.UniformSampler;
-import org.apache.bigtop.bigpetstore.datagenerator.generators.products.ProductCategoryBuilder;
-import org.apache.bigtop.bigpetstore.datagenerator.generators.purchase.MarkovModelProductCategorySampler;
-import org.junit.Test;
-
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-
-public class TestProductCategoryMarkovModelSampler
-{
-	
-	private List<ProductCategory> createProducts()
-	{
-		List<ProductCategory> productCategories = Lists.newArrayList();
-		
-		ProductCategoryBuilder foodBuilder = new ProductCategoryBuilder();
-		foodBuilder.addApplicableSpecies(PetSpecies.DOG);
-		foodBuilder.setAmountUsedPetPetAverage(1.0);
-		foodBuilder.setAmountUsedPetPetVariance(1.0);
-		foodBuilder.setDailyUsageRate(2.0);
-		foodBuilder.setCategory("dogFood");
-		foodBuilder.addProduct(new Product(ImmutableMap.of(Constants.PRODUCT_CATEGORY, (Object) "dogFood",
-				Constants.PRODUCT_QUANTITY, (Object) 60.0, "Flavor", "Fish & Potato")));
-		foodBuilder.addProduct(new Product(ImmutableMap.of(Constants.PRODUCT_CATEGORY, (Object) "dogFood",
-				Constants.PRODUCT_QUANTITY, (Object) 30.0, "Flavor", "Chicken & Rice")));
-		foodBuilder.addProduct(new Product(ImmutableMap.of(Constants.PRODUCT_CATEGORY, (Object) "dogFood",
-				Constants.PRODUCT_QUANTITY, (Object) 15.0, "Flavor", "Lamb & Barley")));
-		productCategories.add(foodBuilder.build());
-		
-		ProductCategoryBuilder bagBuilder = new ProductCategoryBuilder();
-		bagBuilder.addApplicableSpecies(PetSpecies.DOG);
-		bagBuilder.setAmountUsedPetPetAverage(1.0);
-		bagBuilder.setAmountUsedPetPetVariance(1.0);
-		bagBuilder.setDailyUsageRate(2.0);
-		bagBuilder.setCategory("Poop Bags");
-		bagBuilder.addProduct(new Product(ImmutableMap.of(Constants.PRODUCT_CATEGORY, (Object) "Poop Bags",
-				Constants.PRODUCT_QUANTITY, (Object) 60.0, "Color", "Blue")));
-		bagBuilder.addProduct(new Product(ImmutableMap.of(Constants.PRODUCT_CATEGORY, (Object) "Poop Bags",
-				Constants.PRODUCT_QUANTITY, (Object) 30.0, "Color", "Red")));
-		bagBuilder.addProduct(new Product(ImmutableMap.of(Constants.PRODUCT_CATEGORY, (Object) "Poop Bags",
-				Constants.PRODUCT_QUANTITY, (Object) 120.0, "Flavor", "Multicolor")));
-		productCategories.add(bagBuilder.build());
-		
-		return productCategories;
-	}
-
-	@Test
-	public void testSample() throws Exception
-	{
-		SeedFactory seedFactory = new SeedFactory(1245);
-		
-		List<ProductCategory> productCategories = createProducts();
-		
-		ProductCategory productCategory = productCategories.get(0);
-		
-		Sampler<Double> fieldWeightSampler = new UniformSampler(seedFactory);
-		
-		Map<String, Double> fieldWeights = Maps.newHashMap();
-		for(String fieldName : productCategory.getFieldNames())
-		{
-			fieldWeights.put(fieldName, fieldWeightSampler.sample());
-		}
-		
-		MarkovModelProductCategorySampler generator = new MarkovModelProductCategorySampler(productCategory,
-				fieldWeights, new UniformSampler(seedFactory), new UniformSampler(seedFactory)
-				);
-		
-		MarkovModel<Product> model = generator.sample();
-		
-		assertNotNull(model);
-		assertNotNull(model.getStartWeights());
-		assertNotNull(model.getTransitionWeights());
-		assertTrue(model.getStartWeights().size() > 0);
-		assertTrue(model.getTransitionWeights().size() > 0);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/bigtop/blob/15af83eb/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/purchase/TestPurchasingModelSampler.java
----------------------------------------------------------------------
diff --git a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/purchase/TestPurchasingModelSampler.java b/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/purchase/TestPurchasingModelSampler.java
deleted file mode 100644
index 12efe13..0000000
--- a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/purchase/TestPurchasingModelSampler.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.bigtop.bigpetstore.datagenerator.generators.purchase;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.util.List;
-
-import org.apache.bigtop.bigpetstore.datagenerator.Constants;
-import org.apache.bigtop.bigpetstore.datagenerator.datamodels.PetSpecies;
-import org.apache.bigtop.bigpetstore.datagenerator.datamodels.Product;
-import org.apache.bigtop.bigpetstore.datagenerator.datamodels.inputs.ProductCategory;
-import org.apache.bigtop.bigpetstore.datagenerator.framework.SeedFactory;
-import org.apache.bigtop.bigpetstore.datagenerator.framework.samplers.Sampler;
-import org.apache.bigtop.bigpetstore.datagenerator.generators.products.ProductCategoryBuilder;
-import org.apache.bigtop.bigpetstore.datagenerator.generators.purchase.MarkovPurchasingModel;
-import org.apache.bigtop.bigpetstore.datagenerator.generators.purchase.PurchasingModelSamplerBuilder;
-import org.junit.Test;
-
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Lists;
-
-public class TestPurchasingModelSampler
-{
-	
-	private List<ProductCategory> createProducts()
-	{
-		List<ProductCategory> productCategories = Lists.newArrayList();
-		
-		ProductCategoryBuilder foodBuilder = new ProductCategoryBuilder();
-		foodBuilder.addApplicableSpecies(PetSpecies.DOG);
-		foodBuilder.setAmountUsedPetPetAverage(1.0);
-		foodBuilder.setAmountUsedPetPetVariance(1.0);
-		foodBuilder.setDailyUsageRate(2.0);
-		foodBuilder.setCategory("dogFood");
-		foodBuilder.addProduct(new Product(ImmutableMap.of(Constants.PRODUCT_CATEGORY, (Object) "dogFood",
-				Constants.PRODUCT_QUANTITY, (Object) 60.0, "Flavor", "Fish & Potato")));
-		foodBuilder.addProduct(new Product(ImmutableMap.of(Constants.PRODUCT_CATEGORY, (Object) "dogFood",
-				Constants.PRODUCT_QUANTITY, (Object) 30.0, "Flavor", "Chicken & Rice")));
-		foodBuilder.addProduct(new Product(ImmutableMap.of(Constants.PRODUCT_CATEGORY, (Object) "dogFood",
-				Constants.PRODUCT_QUANTITY, (Object) 15.0, "Flavor", "Lamb & Barley")));
-		productCategories.add(foodBuilder.build());
-		
-		ProductCategoryBuilder bagBuilder = new ProductCategoryBuilder();
-		bagBuilder.addApplicableSpecies(PetSpecies.DOG);
-		bagBuilder.setAmountUsedPetPetAverage(1.0);
-		bagBuilder.setAmountUsedPetPetVariance(1.0);
-		bagBuilder.setDailyUsageRate(2.0);
-		bagBuilder.setCategory("Poop Bags");
-		bagBuilder.addProduct(new Product(ImmutableMap.of(Constants.PRODUCT_CATEGORY, (Object) "Poop Bags",
-				Constants.PRODUCT_QUANTITY, (Object) 60.0, "Color", "Blue")));
-		bagBuilder.addProduct(new Product(ImmutableMap.of(Constants.PRODUCT_CATEGORY, (Object) "Poop Bags",
-				Constants.PRODUCT_QUANTITY, (Object) 30.0, "Color", "Red")));
-		bagBuilder.addProduct(new Product(ImmutableMap.of(Constants.PRODUCT_CATEGORY, (Object) "Poop Bags",
-				Constants.PRODUCT_QUANTITY, (Object) 120.0, "Color", "Multicolor")));
-		productCategories.add(bagBuilder.build());
-		
-		return productCategories;
-	}
-
-	@Test
-	public void testSample() throws Exception
-	{
-		SeedFactory seedFactory = new SeedFactory(1245);
-		
-		List<ProductCategory> productCategories = createProducts();
-		
-		PurchasingModelSamplerBuilder builder = new PurchasingModelSamplerBuilder(productCategories, seedFactory);
-		Sampler<MarkovPurchasingModel> sampler = builder.buildMarkovPurchasingModel();
-		MarkovPurchasingModel profile = sampler.sample();
-		
-		assertNotNull(profile);
-		assertNotNull(profile.getProductCategories());
-		assertTrue(profile.getProductCategories().size() > 0);
-		
-		for(String label : profile.getProductCategories())
-		{
-			assertNotNull(profile.getProfile(label));
-			assertNotNull(profile.getProfile(label).getStartWeights());
-			assertTrue(profile.getProfile(label).getStartWeights().size() > 0);
-			assertNotNull(profile.getProfile(label).getTransitionWeights());
-			assertTrue(profile.getProfile(label).getTransitionWeights().size() > 0);
-		}
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/bigtop/blob/15af83eb/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/purchase/TestPurchasingModelSamplerBuilder.java
----------------------------------------------------------------------
diff --git a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/purchase/TestPurchasingModelSamplerBuilder.java b/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/purchase/TestPurchasingModelSamplerBuilder.java
deleted file mode 100644
index 2d526ed..0000000
--- a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/purchase/TestPurchasingModelSamplerBuilder.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.bigtop.bigpetstore.datagenerator.generators.purchase;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.util.List;
-
-import org.apache.bigtop.bigpetstore.datagenerator.Constants;
-import org.apache.bigtop.bigpetstore.datagenerator.datamodels.PetSpecies;
-import org.apache.bigtop.bigpetstore.datagenerator.datamodels.Product;
-import org.apache.bigtop.bigpetstore.datagenerator.datamodels.inputs.ProductCategory;
-import org.apache.bigtop.bigpetstore.datagenerator.framework.SeedFactory;
-import org.apache.bigtop.bigpetstore.datagenerator.framework.samplers.Sampler;
-import org.apache.bigtop.bigpetstore.datagenerator.generators.products.ProductCategoryBuilder;
-import org.apache.bigtop.bigpetstore.datagenerator.generators.purchase.MarkovPurchasingModel;
-import org.apache.bigtop.bigpetstore.datagenerator.generators.purchase.PurchasingModelSamplerBuilder;
-import org.junit.Test;
-
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Lists;
-
-public class TestPurchasingModelSamplerBuilder
-{
-	
-	private List<ProductCategory> createProducts()
-	{
-		List<ProductCategory> productCategories = Lists.newArrayList();
-		
-		ProductCategoryBuilder foodBuilder = new ProductCategoryBuilder();
-		foodBuilder.addApplicableSpecies(PetSpecies.DOG);
-		foodBuilder.setAmountUsedPetPetAverage(1.0);
-		foodBuilder.setAmountUsedPetPetVariance(1.0);
-		foodBuilder.setDailyUsageRate(2.0);
-		foodBuilder.setCategory("dogFood");
-		foodBuilder.addProduct(new Product(ImmutableMap.of(Constants.PRODUCT_CATEGORY, (Object) "dogFood",
-				Constants.PRODUCT_QUANTITY, (Object) 60.0, "Flavor", "Fish & Potato")));
-		foodBuilder.addProduct(new Product(ImmutableMap.of(Constants.PRODUCT_CATEGORY, (Object) "dogFood",
-				Constants.PRODUCT_QUANTITY, (Object) 30.0, "Flavor", "Chicken & Rice")));
-		foodBuilder.addProduct(new Product(ImmutableMap.of(Constants.PRODUCT_CATEGORY, (Object) "dogFood",
-				Constants.PRODUCT_QUANTITY, (Object) 15.0, "Flavor", "Lamb & Barley")));
-		productCategories.add(foodBuilder.build());
-		
-		ProductCategoryBuilder bagBuilder = new ProductCategoryBuilder();
-		bagBuilder.addApplicableSpecies(PetSpecies.DOG);
-		bagBuilder.setAmountUsedPetPetAverage(1.0);
-		bagBuilder.setAmountUsedPetPetVariance(1.0);
-		bagBuilder.setDailyUsageRate(2.0);
-		bagBuilder.setCategory("Poop Bags");
-		bagBuilder.addProduct(new Product(ImmutableMap.of(Constants.PRODUCT_CATEGORY, (Object) "Poop Bags",
-				Constants.PRODUCT_QUANTITY, (Object) 60.0, "Color", "Blue")));
-		bagBuilder.addProduct(new Product(ImmutableMap.of(Constants.PRODUCT_CATEGORY, (Object) "Poop Bags",
-				Constants.PRODUCT_QUANTITY, (Object) 30.0, "Color", "Red")));
-		bagBuilder.addProduct(new Product(ImmutableMap.of(Constants.PRODUCT_CATEGORY, (Object) "Poop Bags",
-				Constants.PRODUCT_QUANTITY, (Object) 120.0, "Color", "Multicolor")));
-		productCategories.add(bagBuilder.build());
-		
-		return productCategories;
-	}
-
-	@Test
-	public void testBuild() throws Exception
-	{
-		SeedFactory seedFactory = new SeedFactory(1245);
-		
-		List<ProductCategory> productCategories = createProducts();
-		
-		PurchasingModelSamplerBuilder builder = new PurchasingModelSamplerBuilder(productCategories, seedFactory);
-		Sampler<MarkovPurchasingModel> sampler = builder.buildMarkovPurchasingModel();
-		MarkovPurchasingModel profile = sampler.sample();
-		
-		assertNotNull(profile);
-		assertNotNull(profile.getProductCategories());
-		assertTrue(profile.getProductCategories().size() > 0);
-		
-		for(String label : profile.getProductCategories())
-		{
-			assertNotNull(profile.getProfile(label));
-			assertNotNull(profile.getProfile(label).getStartWeights());
-			assertTrue(profile.getProfile(label).getStartWeights().size() > 0);
-			assertNotNull(profile.getProfile(label).getTransitionWeights());
-			assertTrue(profile.getProfile(label).getTransitionWeights().size() > 0);
-		}
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/bigtop/blob/15af83eb/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/purchase/TestPurchasingProcesses.java
----------------------------------------------------------------------
diff --git a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/purchase/TestPurchasingProcesses.java b/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/purchase/TestPurchasingProcesses.java
deleted file mode 100644
index c110def..0000000
--- a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/purchase/TestPurchasingProcesses.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.bigtop.bigpetstore.datagenerator.generators.purchase;
-
-import static org.junit.Assert.assertNotNull;
-
-import java.util.Map;
-
-import org.apache.bigtop.bigpetstore.datagenerator.Constants;
-import org.apache.bigtop.bigpetstore.datagenerator.datamodels.Product;
-import org.apache.bigtop.bigpetstore.datagenerator.framework.SeedFactory;
-import org.apache.bigtop.bigpetstore.datagenerator.framework.samplers.RouletteWheelSampler;
-import org.apache.bigtop.bigpetstore.datagenerator.framework.samplers.Sampler;
-import org.apache.bigtop.bigpetstore.datagenerator.generators.purchase.PurchasingProcesses;
-import org.junit.Test;
-
-import com.google.common.collect.Maps;
-
-public class TestPurchasingProcesses
-{
-	
-	@Test
-	public void testSimulatePurchase() throws Exception
-	{
-		Map<Product, Double> productPDF = Maps.newHashMap();
-		
-		for(int i = 0; i < 10; i++)
-		{
-			Map<String, Object> fields = Maps.newHashMap();
-			fields.put(Constants.PRODUCT_CATEGORY, "dog food");
-			fields.put(Constants.PRODUCT_QUANTITY, (double) (i + 1));
-			Product product = new Product(fields);
-			productPDF.put(product, 0.1);
-		}
-		
-		SeedFactory seedFactory = new SeedFactory(1234);
-		Sampler<Product> sampler = RouletteWheelSampler.create(productPDF, seedFactory);
-		
-		
-		Map<String, Sampler<Product>> processesMap = Maps.newHashMap();
-		processesMap.put("dog food", sampler);
-		PurchasingProcesses processes = new PurchasingProcesses(processesMap);
-		
-		Product product = processes.sample("dog food");
-		
-		assertNotNull(product);
-		assertNotNull(product.getFieldValue(Constants.PRODUCT_CATEGORY));
-		assertNotNull(product.getFieldValue(Constants.PRODUCT_QUANTITY));
-		
-		product = processes.sample("dog food");
-		
-		assertNotNull(product);
-		assertNotNull(product.getFieldValue(Constants.PRODUCT_CATEGORY));
-		assertNotNull(product.getFieldValue(Constants.PRODUCT_QUANTITY));
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/bigtop/blob/15af83eb/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/store/TestStoreLocationIncomePDF.java
----------------------------------------------------------------------
diff --git a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/store/TestStoreLocationIncomePDF.java b/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/store/TestStoreLocationIncomePDF.java
deleted file mode 100644
index f9b8126..0000000
--- a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/store/TestStoreLocationIncomePDF.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.bigtop.bigpetstore.datagenerator.generators.store;
-
-import static org.junit.Assert.assertTrue;
-
-import java.util.Arrays;
-import java.util.List;
-
-import org.apache.bigtop.bigpetstore.datagenerator.datamodels.inputs.ZipcodeRecord;
-import org.apache.commons.lang3.tuple.Pair;
-import org.junit.Test;
-
-public class TestStoreLocationIncomePDF
-{
-
-	@Test
-	public void testProbability() throws Exception
-	{
-		List<ZipcodeRecord> zipcodes = Arrays.asList(new ZipcodeRecord[] {				
-				new ZipcodeRecord("11111", Pair.of(1.0, 1.0), "AZ", "Tempte", 30000.0, 100),
-				new ZipcodeRecord("22222", Pair.of(2.0, 2.0), "AZ", "Phoenix", 45000.0, 200),
-				new ZipcodeRecord("33333", Pair.of(3.0, 3.0), "AZ", "Flagstaff", 60000.0, 300)
-				});
-		
-		StoreLocationIncomePDF pdf = new StoreLocationIncomePDF(zipcodes, 100.0);
-		
-		for(ZipcodeRecord record : zipcodes)
-		{
-			assertTrue(pdf.probability(record) > 0.0);
-		}
-		
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/bigtop/blob/15af83eb/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/store/TestStoreLocationPopulationPDF.java
----------------------------------------------------------------------
diff --git a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/store/TestStoreLocationPopulationPDF.java b/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/store/TestStoreLocationPopulationPDF.java
deleted file mode 100644
index 792f6d0..0000000
--- a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/store/TestStoreLocationPopulationPDF.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.bigtop.bigpetstore.datagenerator.generators.store;
-
-import static org.junit.Assert.assertTrue;
-
-import java.util.Arrays;
-import java.util.List;
-
-import org.apache.bigtop.bigpetstore.datagenerator.datamodels.inputs.ZipcodeRecord;
-import org.apache.commons.lang3.tuple.Pair;
-import org.junit.Test;
-
-public class TestStoreLocationPopulationPDF
-{
-
-	@Test
-	public void testProbability() throws Exception
-	{
-		List<ZipcodeRecord> zipcodes = Arrays.asList(new ZipcodeRecord[] {				
-				new ZipcodeRecord("11111", Pair.of(1.0, 1.0), "AZ", "Tempte", 30000.0, 100),
-				new ZipcodeRecord("22222", Pair.of(2.0, 2.0), "AZ", "Phoenix", 45000.0, 200),
-				new ZipcodeRecord("33333", Pair.of(3.0, 3.0), "AZ", "Flagstaff", 60000.0, 300)
-				});
-		
-		StoreLocationPopulationPDF pdf = new StoreLocationPopulationPDF(zipcodes);
-		
-		for(ZipcodeRecord record : zipcodes)
-		{
-			assertTrue(pdf.probability(record) > 0.0);
-		}
-		
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/bigtop/blob/15af83eb/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/store/TestStoreSampler.java
----------------------------------------------------------------------
diff --git a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/store/TestStoreSampler.java b/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/store/TestStoreSampler.java
deleted file mode 100644
index 64589f4..0000000
--- a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/store/TestStoreSampler.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.bigtop.bigpetstore.datagenerator.generators.store;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.util.Arrays;
-import java.util.Collection;
-
-import org.apache.bigtop.bigpetstore.datagenerator.datamodels.Store;
-import org.apache.bigtop.bigpetstore.datagenerator.datamodels.inputs.ZipcodeRecord;
-import org.apache.bigtop.bigpetstore.datagenerator.framework.SeedFactory;
-import org.apache.bigtop.bigpetstore.datagenerator.framework.samplers.RouletteWheelSampler;
-import org.apache.bigtop.bigpetstore.datagenerator.framework.samplers.Sampler;
-import org.apache.bigtop.bigpetstore.datagenerator.framework.samplers.SequenceSampler;
-import org.apache.commons.lang3.tuple.Pair;
-import org.junit.Test;
-
-public class TestStoreSampler
-{
-
-	@Test
-	public void testSampler() throws Exception
-	{
-		Collection<ZipcodeRecord> zipcodes = Arrays.asList(new ZipcodeRecord[] {				
-				new ZipcodeRecord("11111", Pair.of(1.0, 1.0), "AZ", "Tempte", 30000.0, 100),
-				new ZipcodeRecord("22222", Pair.of(2.0, 2.0), "AZ", "Phoenix", 45000.0, 200),
-				new ZipcodeRecord("33333", Pair.of(3.0, 3.0), "AZ", "Flagstaff", 60000.0, 300)
-				});
-		
-		SeedFactory factory = new SeedFactory(1234);
-		
-		Sampler<Store> sampler = new StoreSampler(new SequenceSampler(), 
-				RouletteWheelSampler.createUniform(zipcodes, factory));
-		
-		Store store = sampler.sample();
-		assertNotNull(store);
-		assertTrue(store.getId() >= 0);
-		assertNotNull(store.getName());
-		assertNotNull(store.getLocation());
-		
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/bigtop/blob/15af83eb/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/store/TestStoreSamplerBuilder.java
----------------------------------------------------------------------
diff --git a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/store/TestStoreSamplerBuilder.java b/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/store/TestStoreSamplerBuilder.java
deleted file mode 100644
index b7b0a52..0000000
--- a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/store/TestStoreSamplerBuilder.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.bigtop.bigpetstore.datagenerator.generators.store;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.util.Arrays;
-import java.util.List;
-
-import org.apache.bigtop.bigpetstore.datagenerator.datamodels.Store;
-import org.apache.bigtop.bigpetstore.datagenerator.datamodels.inputs.ZipcodeRecord;
-import org.apache.bigtop.bigpetstore.datagenerator.framework.SeedFactory;
-import org.apache.bigtop.bigpetstore.datagenerator.framework.samplers.Sampler;
-import org.apache.commons.lang3.tuple.Pair;
-import org.junit.Test;
-
-public class TestStoreSamplerBuilder
-{
-
-	@Test
-	public void testBuild() throws Exception
-	{
-		List<ZipcodeRecord> zipcodes = Arrays.asList(new ZipcodeRecord[] {				
-				new ZipcodeRecord("11111", Pair.of(1.0, 1.0), "AZ", "Tempte", 30000.0, 100),
-				new ZipcodeRecord("22222", Pair.of(2.0, 2.0), "AZ", "Phoenix", 45000.0, 200),
-				new ZipcodeRecord("33333", Pair.of(3.0, 3.0), "AZ", "Flagstaff", 60000.0, 300)
-				});
-		
-		assertTrue(zipcodes.size() > 0);
-		
-		SeedFactory factory = new SeedFactory(1234);
-		
-		StoreSamplerBuilder builder = new StoreSamplerBuilder(zipcodes, factory);
-		Sampler<Store> sampler = builder.build();
-		
-		Store store = sampler.sample();
-		assertNotNull(store);
-		assertTrue(store.getId() >= 0);
-		assertNotNull(store.getName());
-		assertNotNull(store.getLocation());
-		
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/bigtop/blob/15af83eb/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/transaction/TestCustomerInventory.java
----------------------------------------------------------------------
diff --git a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/transaction/TestCustomerInventory.java b/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/transaction/TestCustomerInventory.java
deleted file mode 100644
index 322bb5e..0000000
--- a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/transaction/TestCustomerInventory.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.bigtop.bigpetstore.datagenerator.generators.transaction;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.util.Map;
-
-import org.apache.bigtop.bigpetstore.datagenerator.Constants;
-import org.apache.bigtop.bigpetstore.datagenerator.datamodels.PetSpecies;
-import org.apache.bigtop.bigpetstore.datagenerator.datamodels.Product;
-import org.apache.bigtop.bigpetstore.datagenerator.datamodels.inputs.ProductCategory;
-import org.apache.bigtop.bigpetstore.datagenerator.framework.SeedFactory;
-import org.apache.bigtop.bigpetstore.datagenerator.framework.samplers.Sampler;
-import org.apache.bigtop.bigpetstore.datagenerator.generators.products.ProductCategoryBuilder;
-import org.apache.bigtop.bigpetstore.datagenerator.generators.transaction.CustomerInventory;
-import org.apache.bigtop.bigpetstore.datagenerator.generators.transaction.CustomerTransactionParameters;
-import org.apache.bigtop.bigpetstore.datagenerator.generators.transaction.CustomerTransactionParametersSamplerBuilder;
-import org.apache.bigtop.bigpetstore.datagenerator.generators.transaction.ProductCategoryInventory;
-import org.junit.Test;
-
-import com.google.common.collect.Maps;
-
-public class TestCustomerInventory
-{
-	
-	@Test
-	public void testPurchase() throws Exception
-	{
-		SeedFactory seedFactory = new SeedFactory(1234);
-		
-		CustomerTransactionParametersSamplerBuilder transParamsBuilder = new CustomerTransactionParametersSamplerBuilder(seedFactory);
-		Sampler<CustomerTransactionParameters> sampler = transParamsBuilder.build();
-		
-		CustomerTransactionParameters parameters = sampler.sample();
-		
-		ProductCategoryBuilder builder = new ProductCategoryBuilder();
-		builder.addApplicableSpecies(PetSpecies.DOG);
-		builder.setAmountUsedPetPetAverage(1.0);
-		builder.setAmountUsedPetPetVariance(1.0);
-		builder.setDailyUsageRate(2.0);
-		builder.setCategory("dog food");
-		
-		
-		ProductCategory category = builder.build();
-		
-		ProductCategoryInventory productInventory = new ProductCategoryInventory(category, parameters, seedFactory);
-		
-		Map<String, ProductCategoryInventory> inventories = Maps.newHashMap();
-		inventories.put("dog food", productInventory);
-		
-		CustomerInventory inventory = new CustomerInventory(inventories);
-		
-		for(Map.Entry<String, Double> entry : inventory.getExhaustionTimes().entrySet())
-		{
-			assertEquals(entry.getValue(), 0.0, 0.0001);
-		}
-		
-		for(Map.Entry<String, Double> entry : inventory.getInventoryAmounts(0.0).entrySet())
-		{
-			assertEquals(entry.getValue(), 0.0, 0.0001);
-		}
-		
-		Map<String, Object> fields = Maps.newHashMap();
-		fields.put(Constants.PRODUCT_CATEGORY, "dog food");
-		fields.put(Constants.PRODUCT_QUANTITY, 30.0);
-		Product product = new Product(fields);
-		
-		inventory.simulatePurchase(1.0, product);
-		
-		Map<String, Double> exhaustionTimes = inventory.getExhaustionTimes();
-		assertTrue(exhaustionTimes.containsKey("dog food"));
-		assertTrue(exhaustionTimes.get("dog food") > 0.0);
-		
-		Map<String, Double> amounts = inventory.getInventoryAmounts(2.0);
-		assertTrue(amounts.containsKey("dog food"));
-		assertTrue(amounts.get("dog food") > 0.0);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/bigtop/blob/15af83eb/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/transaction/TestCustomerInventoryBuilder.java
----------------------------------------------------------------------
diff --git a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/transaction/TestCustomerInventoryBuilder.java b/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/transaction/TestCustomerInventoryBuilder.java
deleted file mode 100644
index d8d6d70..0000000
--- a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/transaction/TestCustomerInventoryBuilder.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.bigtop.bigpetstore.datagenerator.generators.transaction;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.util.Map;
-
-import org.apache.bigtop.bigpetstore.datagenerator.Constants;
-import org.apache.bigtop.bigpetstore.datagenerator.datamodels.PetSpecies;
-import org.apache.bigtop.bigpetstore.datagenerator.datamodels.Product;
-import org.apache.bigtop.bigpetstore.datagenerator.datamodels.inputs.ProductCategory;
-import org.apache.bigtop.bigpetstore.datagenerator.framework.SeedFactory;
-import org.apache.bigtop.bigpetstore.datagenerator.framework.samplers.Sampler;
-import org.apache.bigtop.bigpetstore.datagenerator.generators.products.ProductCategoryBuilder;
-import org.apache.bigtop.bigpetstore.datagenerator.generators.transaction.CustomerInventory;
-import org.apache.bigtop.bigpetstore.datagenerator.generators.transaction.CustomerInventoryBuilder;
-import org.apache.bigtop.bigpetstore.datagenerator.generators.transaction.CustomerTransactionParameters;
-import org.apache.bigtop.bigpetstore.datagenerator.generators.transaction.CustomerTransactionParametersSamplerBuilder;
-import org.junit.Test;
-
-import com.google.common.collect.Maps;
-
-public class TestCustomerInventoryBuilder
-{
-	
-	@Test
-	public void testBuild() throws Exception
-	{
-		SeedFactory seedFactory = new SeedFactory(1234);
-		
-		CustomerTransactionParametersSamplerBuilder transParamsBuilder = new CustomerTransactionParametersSamplerBuilder(seedFactory);
-		Sampler<CustomerTransactionParameters> sampler = transParamsBuilder.build();
-		
-		CustomerTransactionParameters parameters = sampler.sample();
-		
-		ProductCategoryBuilder builder = new ProductCategoryBuilder();
-		builder.addApplicableSpecies(PetSpecies.DOG);
-		builder.setAmountUsedPetPetAverage(1.0);
-		builder.setAmountUsedPetPetVariance(1.0);
-		builder.setDailyUsageRate(2.0);
-		builder.setCategory("dog food");
-		
-		ProductCategory category = builder.build();
-		
-		CustomerInventoryBuilder inventoryBuilder = new CustomerInventoryBuilder(parameters, seedFactory);
-		inventoryBuilder.addProductCategory(category);
-		
-		CustomerInventory inventory = inventoryBuilder.build();
-		
-		for(Map.Entry<String, Double> entry : inventory.getExhaustionTimes().entrySet())
-		{
-			assertEquals(entry.getValue(), 0.0, 0.0001);
-		}
-		
-		for(Map.Entry<String, Double> entry : inventory.getInventoryAmounts(0.0).entrySet())
-		{
-			assertEquals(entry.getValue(), 0.0, 0.0001);
-		}
-		
-		Map<String, Object> fields = Maps.newHashMap();
-		fields.put(Constants.PRODUCT_CATEGORY, "dog food");
-		fields.put(Constants.PRODUCT_QUANTITY, 30.0);
-		Product product = new Product(fields);
-		
-		inventory.simulatePurchase(1.0, product);
-		
-		Map<String, Double> exhaustionTimes = inventory.getExhaustionTimes();
-		assertTrue(exhaustionTimes.containsKey("dog food"));
-		assertTrue(exhaustionTimes.get("dog food") > 0.0);
-		
-		Map<String, Double> amounts = inventory.getInventoryAmounts(2.0);
-		assertTrue(amounts.containsKey("dog food"));
-		assertTrue(amounts.get("dog food") > 0.0);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/bigtop/blob/15af83eb/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/transaction/TestCustomerTransactionParameters.java
----------------------------------------------------------------------
diff --git a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/transaction/TestCustomerTransactionParameters.java b/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/transaction/TestCustomerTransactionParameters.java
deleted file mode 100644
index a9fdaec..0000000
--- a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/transaction/TestCustomerTransactionParameters.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.bigtop.bigpetstore.datagenerator.generators.transaction;
-
-import static org.junit.Assert.assertEquals;
-
-import java.util.Arrays;
-
-import org.apache.bigtop.bigpetstore.datagenerator.datamodels.PetSpecies;
-import org.apache.bigtop.bigpetstore.datagenerator.generators.transaction.CustomerTransactionParameters;
-import org.junit.Test;
-
-import com.google.common.collect.HashMultiset;
-import com.google.common.collect.Multiset;
-
-public class TestCustomerTransactionParameters
-{
-
-	@Test
-	public void testCountPetsBySpecies() throws Exception
-	{
-		Multiset<PetSpecies> petCounts = HashMultiset.create();
-		
-		petCounts.add(PetSpecies.CAT);
-		petCounts.add(PetSpecies.CAT);
-		petCounts.add(PetSpecies.CAT);
-		
-		
-		CustomerTransactionParameters transParams = new CustomerTransactionParameters(
-				petCounts, 0.0, 0.0);
-		
-		
-		assertEquals(transParams.countPetsBySpecies(PetSpecies.CAT), 3);
-		assertEquals(transParams.countPetsBySpecies(PetSpecies.DOG), 0);
-		assertEquals(transParams.countPets(), 3);
-	}
-	
-	@Test
-	public void testCountPetsByMultipleSpecies() throws Exception
-	{
-		Multiset<PetSpecies> petCounts = HashMultiset.create();
-		
-		petCounts.add(PetSpecies.CAT);
-		petCounts.add(PetSpecies.CAT);
-		petCounts.add(PetSpecies.DOG);
-		
-		
-		CustomerTransactionParameters transParams = new CustomerTransactionParameters(
-				petCounts, 0.0, 0.0);
-		
-		
-		assertEquals(transParams.countPetsBySpecies(Arrays.asList(PetSpecies.values())), 3);
-		assertEquals(transParams.countPets(), 3);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/bigtop/blob/15af83eb/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/transaction/TestCustomerTransactionParametersBuilder.java
----------------------------------------------------------------------
diff --git a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/transaction/TestCustomerTransactionParametersBuilder.java b/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/transaction/TestCustomerTransactionParametersBuilder.java
deleted file mode 100644
index 0630c63..0000000
--- a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/transaction/TestCustomerTransactionParametersBuilder.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.bigtop.bigpetstore.datagenerator.generators.transaction;
-
-import static org.junit.Assert.assertTrue;
-
-import org.apache.bigtop.bigpetstore.datagenerator.datamodels.PetSpecies;
-import org.apache.bigtop.bigpetstore.datagenerator.generators.transaction.CustomerTransactionParameters;
-import org.apache.bigtop.bigpetstore.datagenerator.generators.transaction.CustomerTransactionParametersBuilder;
-import org.junit.Test;
-
-public class TestCustomerTransactionParametersBuilder
-{
-
-	@Test
-	public void testBuild() throws Exception
-	{
-		CustomerTransactionParametersBuilder builder = new CustomerTransactionParametersBuilder();
-		
-		builder.addPet(PetSpecies.DOG);
-		builder.addPet(PetSpecies.DOG);
-		builder.addPet(PetSpecies.DOG);
-		
-		builder.setAveragePurchaseTriggerTime(1.0);
-		builder.setAverageTransactionTriggerTime(2.0);
-		
-		CustomerTransactionParameters transParams = builder.build();
-		
-		assertTrue(transParams.countPetsBySpecies(PetSpecies.DOG) == 3);
-		assertTrue(transParams.countPetsBySpecies(PetSpecies.CAT) == 0);
-		assertTrue(transParams.getAveragePurchaseTriggerTime() == 1.0);
-		assertTrue(transParams.getAverageTransactionTriggerTime() == 2.0);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/bigtop/blob/15af83eb/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/transaction/TestCustomerTransactionParametersSampler.java
----------------------------------------------------------------------
diff --git a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/transaction/TestCustomerTransactionParametersSampler.java b/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/transaction/TestCustomerTransactionParametersSampler.java
deleted file mode 100644
index 49fa16d..0000000
--- a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/transaction/TestCustomerTransactionParametersSampler.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.bigtop.bigpetstore.datagenerator.generators.transaction;
-
-import static org.junit.Assert.assertTrue;
-
-import org.apache.bigtop.bigpetstore.datagenerator.Constants;
-import org.apache.bigtop.bigpetstore.datagenerator.framework.SeedFactory;
-import org.apache.bigtop.bigpetstore.datagenerator.framework.samplers.Sampler;
-import org.apache.bigtop.bigpetstore.datagenerator.generators.transaction.CustomerTransactionParameters;
-import org.apache.bigtop.bigpetstore.datagenerator.generators.transaction.CustomerTransactionParametersSamplerBuilder;
-import org.junit.Test;
-
-public class TestCustomerTransactionParametersSampler
-{
-
-	@Test
-	public void testSample() throws Exception
-	{
-		SeedFactory seedFactory = new SeedFactory(1234);
-		CustomerTransactionParametersSamplerBuilder builder = new CustomerTransactionParametersSamplerBuilder(seedFactory);
-		Sampler<CustomerTransactionParameters> sampler = builder.build();
-		
-		CustomerTransactionParameters transParams = sampler.sample();
-		
-		assertTrue(transParams.countPets() >= Constants.MIN_PETS);
-		assertTrue(transParams.countPets() <= Constants.MAX_PETS);
-		assertTrue(transParams.getAveragePurchaseTriggerTime() >= Constants.PURCHASE_TRIGGER_TIME_MIN);
-		assertTrue(transParams.getAveragePurchaseTriggerTime() <= Constants.PURCHASE_TRIGGER_TIME_MAX);
-		assertTrue(transParams.getAverageTransactionTriggerTime() >= Constants.TRANSACTION_TRIGGER_TIME_MIN);
-		assertTrue(transParams.getAverageTransactionTriggerTime() <= Constants.TRANSACTION_TRIGGER_TIME_MAX);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/bigtop/blob/15af83eb/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/transaction/TestCustomerTransactionParametersSamplerBuilder.java
----------------------------------------------------------------------
diff --git a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/transaction/TestCustomerTransactionParametersSamplerBuilder.java b/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/transaction/TestCustomerTransactionParametersSamplerBuilder.java
deleted file mode 100644
index fbe4e08..0000000
--- a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/transaction/TestCustomerTransactionParametersSamplerBuilder.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.bigtop.bigpetstore.datagenerator.generators.transaction;
-
-import static org.junit.Assert.assertTrue;
-
-import org.apache.bigtop.bigpetstore.datagenerator.Constants;
-import org.apache.bigtop.bigpetstore.datagenerator.framework.SeedFactory;
-import org.apache.bigtop.bigpetstore.datagenerator.framework.samplers.Sampler;
-import org.apache.bigtop.bigpetstore.datagenerator.generators.transaction.CustomerTransactionParameters;
-import org.apache.bigtop.bigpetstore.datagenerator.generators.transaction.CustomerTransactionParametersSamplerBuilder;
-import org.junit.Test;
-
-public class TestCustomerTransactionParametersSamplerBuilder
-{
-
-	@Test
-	public void testBuild() throws Exception
-	{
-		SeedFactory seedFactory = new SeedFactory(1234);
-		CustomerTransactionParametersSamplerBuilder builder = new CustomerTransactionParametersSamplerBuilder(seedFactory);
-		Sampler<CustomerTransactionParameters> sampler = builder.build();
-		
-		CustomerTransactionParameters transParams = sampler.sample();
-		
-		assertTrue(transParams.countPets() >= Constants.MIN_PETS);
-		assertTrue(transParams.countPets() <= Constants.MAX_PETS);
-		assertTrue(transParams.getAveragePurchaseTriggerTime() >= Constants.PURCHASE_TRIGGER_TIME_MIN);
-		assertTrue(transParams.getAveragePurchaseTriggerTime() <= Constants.PURCHASE_TRIGGER_TIME_MAX);
-		assertTrue(transParams.getAverageTransactionTriggerTime() >= Constants.TRANSACTION_TRIGGER_TIME_MIN);
-		assertTrue(transParams.getAverageTransactionTriggerTime() <= Constants.TRANSACTION_TRIGGER_TIME_MAX);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/bigtop/blob/15af83eb/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/transaction/TestProductCategoryInventory.java
----------------------------------------------------------------------
diff --git a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/transaction/TestProductCategoryInventory.java b/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/transaction/TestProductCategoryInventory.java
deleted file mode 100644
index dc08979..0000000
--- a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/transaction/TestProductCategoryInventory.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.bigtop.bigpetstore.datagenerator.generators.transaction;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.util.Map;
-
-import org.apache.bigtop.bigpetstore.datagenerator.Constants;
-import org.apache.bigtop.bigpetstore.datagenerator.datamodels.PetSpecies;
-import org.apache.bigtop.bigpetstore.datagenerator.datamodels.Product;
-import org.apache.bigtop.bigpetstore.datagenerator.datamodels.inputs.ProductCategory;
-import org.apache.bigtop.bigpetstore.datagenerator.framework.SeedFactory;
-import org.apache.bigtop.bigpetstore.datagenerator.framework.samplers.Sampler;
-import org.apache.bigtop.bigpetstore.datagenerator.generators.products.ProductCategoryBuilder;
-import org.apache.bigtop.bigpetstore.datagenerator.generators.transaction.CustomerTransactionParameters;
-import org.apache.bigtop.bigpetstore.datagenerator.generators.transaction.CustomerTransactionParametersSamplerBuilder;
-import org.apache.bigtop.bigpetstore.datagenerator.generators.transaction.ProductCategoryInventory;
-import org.junit.Test;
-
-import com.google.common.collect.Maps;
-
-public class TestProductCategoryInventory
-{
-	
-	@Test
-	public void testPurchase() throws Exception
-	{
-		SeedFactory seedFactory = new SeedFactory(1234);
-		
-		CustomerTransactionParametersSamplerBuilder transParamsBuilder = new CustomerTransactionParametersSamplerBuilder(seedFactory);
-		Sampler<CustomerTransactionParameters> sampler = transParamsBuilder.build();
-		
-		CustomerTransactionParameters parameters = sampler.sample();
-		
-		ProductCategoryBuilder builder = new ProductCategoryBuilder();
-		builder.addApplicableSpecies(PetSpecies.DOG);
-		builder.setAmountUsedPetPetAverage(1.0);
-		builder.setAmountUsedPetPetVariance(1.0);
-		builder.setDailyUsageRate(2.0);
-		
-		
-		ProductCategory category = builder.build();
-		
-		ProductCategoryInventory inventory = new ProductCategoryInventory(category, parameters, seedFactory);
-		
-		assertEquals(inventory.findExhaustionTime(), 0.0, 0.0001);
-		assertEquals(inventory.findRemainingAmount(0.0), 0.0, 0.0001);
-		
-		Map<String, Object> fields = Maps.newHashMap();
-		fields.put(Constants.PRODUCT_CATEGORY, "dog food");
-		fields.put(Constants.PRODUCT_QUANTITY, 30.0);
-		Product product = new Product(fields);
-		
-		inventory.simulatePurchase(1.0, product);
-		
-		assertTrue(inventory.findExhaustionTime() > 1.0);
-		assertTrue(inventory.findRemainingAmount(1.0) > 0.0);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/bigtop/blob/15af83eb/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/transaction/TestProductCategoryUsageSimulator.java
----------------------------------------------------------------------
diff --git a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/transaction/TestProductCategoryUsageSimulator.java b/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/transaction/TestProductCategoryUsageSimulator.java
deleted file mode 100644
index 6c093df..0000000
--- a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/transaction/TestProductCategoryUsageSimulator.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.bigtop.bigpetstore.datagenerator.generators.transaction;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import org.apache.bigtop.bigpetstore.datagenerator.framework.SeedFactory;
-import org.apache.commons.lang3.tuple.Pair;
-import org.junit.Test;
-
-public class TestProductCategoryUsageSimulator
-{
-	
-	@Test
-	public void testSimulate() throws Exception
-	{
-		SeedFactory seedFactory = new SeedFactory(1234);
-		
-		ProductCategoryUsageSimulator simulator = new ProductCategoryUsageSimulator(2.0, 1.0, 1.0, seedFactory);
-		
-		ProductCategoryUsageTrajectory trajectory = simulator.simulate(0.0, 30.0);
-		
-		assertEquals(0.0, trajectory.getLastAmount(), 0.0001);
-		
-		Pair<Double, Double> previousEntry = trajectory.getStep(0);
-		for(int i = 1; i < trajectory.size(); i++)
-		{
-			Pair<Double, Double> entry = trajectory.getStep(i);
-			// time should move forward
-			assertTrue(previousEntry.getLeft() <= entry.getLeft());
-			// remaining amounts should go down
-			assertTrue(previousEntry.getRight() >= entry.getRight());
-			previousEntry = entry;
-		}
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/bigtop/blob/15af83eb/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/transaction/TestProductCategoryUsageTrajectory.java
----------------------------------------------------------------------
diff --git a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/transaction/TestProductCategoryUsageTrajectory.java b/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/transaction/TestProductCategoryUsageTrajectory.java
deleted file mode 100644
index 5462de2..0000000
--- a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/transaction/TestProductCategoryUsageTrajectory.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.bigtop.bigpetstore.datagenerator.generators.transaction;
-
-import static org.junit.Assert.assertEquals;
-
-import org.apache.commons.lang3.tuple.Pair;
-import org.junit.Test;
-
-public class TestProductCategoryUsageTrajectory
-{
-	
-	@Test
-	public void testTrajectory()
-	{
-		double initialAmount = 30.0;
-		double initialTime = 0.0;
-		
-		ProductCategoryUsageTrajectory trajectory = new ProductCategoryUsageTrajectory(initialTime, initialAmount);
-		
-		assertEquals(trajectory.size(), 1);
-		
-		Pair<Double, Double> entry = trajectory.getStep(0);
-		assertEquals(initialTime, entry.getLeft(), 0.0001);
-		assertEquals(initialAmount, entry.getRight(), 0.0001);
-		
-		trajectory.append(1.0, 25.0);
-		
-		assertEquals(2, trajectory.size());
-		
-		entry = trajectory.getStep(1);
-		assertEquals(1.0, entry.getLeft(), 0.0001);
-		assertEquals(25.0, entry.getRight(), 0.0001);
-		
-		assertEquals(1.0, trajectory.getLastTime(), 0.0001);
-		assertEquals(25.0, trajectory.getLastAmount(), 0.0001);
-	}
-	
-	@Test
-	public void testAmountAtTime()
-	{
-		ProductCategoryUsageTrajectory trajectory = new ProductCategoryUsageTrajectory(0.0, 30.0);
-		trajectory.append(1.0, 25.0);
-		trajectory.append(2.0, 20.0);
-		trajectory.append(3.0, 50.0);
-		trajectory.append(4.0, 40.0);
-		trajectory.append(4.0, 50.0);
-		trajectory.append(5.0, 30.0);
-		
-		assertEquals(30.0, trajectory.amountAtTime(0.5), 0.0001);
-		assertEquals(50.0, trajectory.amountAtTime(4.0), 0.0001);
-		assertEquals(30.0, trajectory.amountAtTime(10.0), 0.0001);
-	}
-
-
-}

http://git-wip-us.apache.org/repos/asf/bigtop/blob/15af83eb/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/transaction/TestTransactionPurchasesHiddenMarkovModel.java
----------------------------------------------------------------------
diff --git a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/transaction/TestTransactionPurchasesHiddenMarkovModel.java b/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/transaction/TestTransactionPurchasesHiddenMarkovModel.java
deleted file mode 100644
index 6383c2e..0000000
--- a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/transaction/TestTransactionPurchasesHiddenMarkovModel.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.bigtop.bigpetstore.datagenerator.generators.transaction;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.util.List;
-import java.util.Map;
-
-import org.apache.bigtop.bigpetstore.datagenerator.Constants;
-import org.apache.bigtop.bigpetstore.datagenerator.datamodels.PetSpecies;
-import org.apache.bigtop.bigpetstore.datagenerator.datamodels.Product;
-import org.apache.bigtop.bigpetstore.datagenerator.datamodels.inputs.ProductCategory;
-import org.apache.bigtop.bigpetstore.datagenerator.framework.SeedFactory;
-import org.apache.bigtop.bigpetstore.datagenerator.framework.markovmodels.MarkovModel;
-import org.apache.bigtop.bigpetstore.datagenerator.framework.markovmodels.MarkovModelBuilder;
-import org.apache.bigtop.bigpetstore.datagenerator.framework.samplers.Sampler;
-import org.apache.bigtop.bigpetstore.datagenerator.framework.wfs.ConditionalWeightFunction;
-import org.apache.bigtop.bigpetstore.datagenerator.generators.products.ProductCategoryBuilder;
-import org.apache.bigtop.bigpetstore.datagenerator.generators.purchase.MarkovPurchasingModel;
-import org.apache.bigtop.bigpetstore.datagenerator.generators.purchase.PurchasingProcesses;
-import org.apache.bigtop.bigpetstore.datagenerator.generators.transaction.CategoryWeightFunction;
-import org.apache.bigtop.bigpetstore.datagenerator.generators.transaction.CustomerInventory;
-import org.apache.bigtop.bigpetstore.datagenerator.generators.transaction.CustomerInventoryBuilder;
-import org.apache.bigtop.bigpetstore.datagenerator.generators.transaction.CustomerTransactionParameters;
-import org.apache.bigtop.bigpetstore.datagenerator.generators.transaction.CustomerTransactionParametersSamplerBuilder;
-import org.apache.bigtop.bigpetstore.datagenerator.generators.transaction.TransactionPurchasesHiddenMarkovModel;
-import org.junit.Test;
-
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-
-public class TestTransactionPurchasesHiddenMarkovModel
-{
-	
-	private List<Product> createProducts(String category)
-	{
-		List<Product> products = Lists.newArrayList();
-		
-		for(int i = 0; i < 10; i++)
-		{
-			Map<String, Object> fields = Maps.newHashMap();
-			fields.put(Constants.PRODUCT_CATEGORY, category);
-			fields.put(Constants.PRODUCT_QUANTITY, (double) (i + 1));
-			Product product = new Product(fields);
-			products.add(product);
-		}
-		
-		return products;
-	}
-	
-	private MarkovModel<Product> createMarkovModel(ProductCategory category)
-	{
-		MarkovModelBuilder<Product> markovBuilder = new MarkovModelBuilder<Product>();
-		
-		for(Product product1 : category.getProducts())
-		{
-			markovBuilder.addStartState(product1, 1.0);
-			for(Product product2 : category.getProducts())
-			{
-				markovBuilder.addTransition(product1, product2, 1.0);
-			}
-		}
-		
-		return markovBuilder.build();
-	}
-	
-	protected PurchasingProcesses createProcesses(ProductCategory dogFoodCategory,
-			ProductCategory catFoodCategory, SeedFactory seedFactory)
-	{	
-		MarkovModel<Product> dogFoodModel = createMarkovModel(dogFoodCategory);
-		MarkovModel<Product> catFoodModel = createMarkovModel(catFoodCategory);
-		
-		Map<String, MarkovModel<Product>> models = Maps.newHashMap();
-		models.put("dog food", dogFoodModel);
-		models.put("cat food", catFoodModel);
-		
-		MarkovPurchasingModel profile = new MarkovPurchasingModel(models);
-		
-		return profile.buildProcesses(seedFactory);
-	}
-	
-	protected ProductCategory createCategory(String category)
-	{
-		List<Product> products = createProducts(category);
-		
-		ProductCategoryBuilder builder = new ProductCategoryBuilder();
-		
-		if(category.equals("dog food"))
-		{
-			builder.addApplicableSpecies(PetSpecies.DOG);
-		}
-		else
-		{
-			builder.addApplicableSpecies(PetSpecies.CAT);
-		}
-		
-		builder.setAmountUsedPetPetAverage(1.0);
-		builder.setAmountUsedPetPetVariance(1.0);
-		builder.setDailyUsageRate(2.0);
-		builder.setCategory(category);
-		builder.setTriggerPurchaseRate(1.0 / 10.0);
-		builder.setTriggerPurchaseRate(1.0 / 10.0);
-		
-		for(Product product : products)
-		{
-			builder.addProduct(product);
-		}
-		
-		return builder.build();
-	}
-
-	protected TransactionPurchasesHiddenMarkovModel createHMM() throws Exception
-	{
-		SeedFactory seedFactory = new SeedFactory(1234);
-		
-		ProductCategory dogFoodCategory = createCategory("dog food");
-		ProductCategory catFoodCategory = createCategory("cat food");
-		
-		PurchasingProcesses processes = createProcesses(dogFoodCategory, catFoodCategory, seedFactory);
-		
-		CustomerTransactionParametersSamplerBuilder transParamsBuilder = new CustomerTransactionParametersSamplerBuilder(seedFactory);
-		Sampler<CustomerTransactionParameters> sampler = transParamsBuilder.build();
-		
-		CustomerTransactionParameters parameters = sampler.sample();
-		
-		CustomerInventoryBuilder inventoryBuilder = new CustomerInventoryBuilder(parameters, seedFactory);
-		inventoryBuilder.addProductCategory(dogFoodCategory);
-		inventoryBuilder.addProductCategory(catFoodCategory);
-		CustomerInventory inventory = inventoryBuilder.build();
-		
-		ConditionalWeightFunction<Double, Double> categoryWF =
-				new CategoryWeightFunction(parameters.getAveragePurchaseTriggerTime());
-		
-		TransactionPurchasesHiddenMarkovModel hmm = new TransactionPurchasesHiddenMarkovModel(processes,
-				categoryWF, inventory, seedFactory);
-		
-		return hmm;
-	}
-	
-	@Test
-	public void testChooseCategory() throws Exception
-	{
-		TransactionPurchasesHiddenMarkovModel hmm = createHMM();
-		
-		String category = hmm.chooseCategory(1.0, 0);
-		
-		assertNotNull(category);
-		assertTrue(category.equals(TransactionPurchasesHiddenMarkovModel.STOP_STATE) ||
-				category.equals("dog food") ||
-				category.equals("cat food"));
-	}
-	
-	@Test
-	public void testChooseProduct() throws Exception
-	{
-		TransactionPurchasesHiddenMarkovModel hmm = createHMM();
-		
-		Product product = hmm.chooseProduct("dog food");
-		
-		assertNotNull(product);
-		assertTrue(product.getFieldValue(Constants.PRODUCT_CATEGORY).equals("dog food"));
-		
-		product = hmm.chooseProduct("cat food");
-		
-		assertNotNull(product);
-		assertTrue(product.getFieldValue(Constants.PRODUCT_CATEGORY).equals("cat food"));
-	}
-	
-	@Test
-	public void testSample() throws Exception
-	{	
-		TransactionPurchasesHiddenMarkovModel hmm = createHMM();
-		
-		List<Product> purchase = hmm.sample(1.0);
-		
-		assertTrue(purchase.size() > 0);
-		
-		for(int i = 0; i < purchase.size(); i++)
-		{
-			Product product = purchase.get(i);
-			
-			// first product should never be null
-			assertNotNull(product);
-			assertTrue(product.getFieldValue(Constants.PRODUCT_CATEGORY).equals("dog food") || 
-					product.getFieldValue(Constants.PRODUCT_CATEGORY).equals("cat food"));
-		}
-		
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/bigtop/blob/15af83eb/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/transaction/TestTransactionTimePDF.java
----------------------------------------------------------------------
diff --git a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/transaction/TestTransactionTimePDF.java b/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/transaction/TestTransactionTimePDF.java
deleted file mode 100644
index 6c2bf31..0000000
--- a/bigtop-data-generators/bigpetstore-data-generator/src/test/java/org/apache/bigtop/bigpetstore/datagenerator/generators/transaction/TestTransactionTimePDF.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.bigtop.bigpetstore.datagenerator.generators.transaction;
-
-import static org.junit.Assert.assertEquals;
-
-import org.apache.bigtop.bigpetstore.datagenerator.generators.transaction.TransactionTimePDF;
-import org.junit.Test;
-
-public class TestTransactionTimePDF
-{
-	
-	@Test
-	public void testProbability() throws Exception
-	{
-		TransactionTimePDF pdf = new TransactionTimePDF();
-		
-		assertEquals(pdf.probability(0.5, 0.75), 0.0, 0.000001);
-		assertEquals(pdf.probability(0.5, 0.5), 1.0, 0.000001);
-		assertEquals(pdf.probability(0.75, 0.5), 1.0, 0.000001);
-	}
-}


Mime
View raw message