@@ -0,0 +1,2346 @@
+package com.github.rnowling.bps.datagenerator.generators.customer;%0A%0Aimport static org.junit.Assert.assertNotNull;%0Aimport static org.junit.Assert.assertTrue;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0Aimport org.junit.Test;%0A%0Aimport com.github.rnowling.bps.datagenerator.Constants;%0Aimport com.github.rnowling.bps.datagenerator.SeedFactory;%0Aimport com.github.rnowling.bps.datagenerator.algorithms.samplers.Sampler;%0Aimport com.github.rnowling.bps.datagenerator.datamodels.inputs.InputData;%0Aimport com.github.rnowling.bps.datagenerator.datamodels.inputs.Names;%0Aimport com.github.rnowling.bps.datagenerator.datamodels.inputs.ZipcodeRecord;%0Aimport com.github.rnowling.bps.datagenerator.datamodels.outputs.Customer;%0Aimport com.github.rnowling.bps.datagenerator.datamodels.outputs.Store;%0Aimport com.github.rnowling.bps.datagenerator.datareaders.NameReader;%0Aimport com.github.rnowling.bps.datagenerator.datareaders.ZipcodeReader;%0Aimport com.github.rnowling.bps.datagenerator.generators.store.StoreSamplerBuilder;%0A%0Apublic class TestCustomerSampler%0A%7B%0A%0A%09@Test%0A%09public void testBuild() throws Exception%0A%09%7B%0A%09%09ZipcodeReader zipcodeReader = new ZipcodeReader();%0A%09%09zipcodeReader.setCoordinatesFile(Constants.COORDINATES_FILE);%0A%09%09zipcodeReader.setIncomesFile(Constants.INCOMES_FILE);%0A%09%09zipcodeReader.setPopulationFile(Constants.POPULATION_FILE);%0A%09%09List%3CZipcodeRecord%3E zipcodes = zipcodeReader.readData();%0A%09%09%0A%09%09NameReader nameReader = new NameReader(Constants.NAMEDB_FILE);%0A%09%09Names names = nameReader.readData();%0A%09%09%0A%09%09InputData inputData = new InputData(zipcodes, names);%0A%09%09%0A%09%09SeedFactory factory = new SeedFactory(1234);%0A%09%09%0A%09%09StoreSamplerBuilder storeSamplerBuilder = new StoreSamplerBuilder(zipcodes, factory);%0A%09%09Sampler%3CStore%3E storeSampler = storeSamplerBuilder.build();%0A%09%09%0A%09%09List%3CStore%3E stores = new ArrayList%3CStore%3E();%0A%09%09for(int i = 0; i %3C 10; i++)%0A%09%09%7B%0A%09%09%09Store store = storeSampler.sample();%0A%09%09%09stores.add(store);%0A%09%09%7D%0A%09%09%0A%09%09CustomerSamplerBuilder builder = new CustomerSamplerBuilder(stores, inputData, factory);%0A%09%09Sampler%3CCustomer%3E sampler = builder.build();%0A%09%09Customer customer = sampler.sample();%0A%09%09%0A%09%09assertNotNull(customer);%0A%09%09assertTrue(customer.getId() %3E= 0);%0A%09%09assertNotNull(customer.getName());%0A%09%09assertNotNull(customer.getName().getFirst());%0A%09%09assertNotNull(customer.getName().getSecond());%0A%09%09assertNotNull(customer.getLocation());%0A%09%09%0A%09%7D%0A%0A%7D%0A

Add customer sampler test that I forgot to add before.