### Question:
CustomerTransactionParametersSampler implements Sampler<CustomerTransactionParameters> { public CustomerTransactionParameters sample() throws Exception { CustomerTransactionParametersBuilder builder = new CustomerTransactionParametersBuilder(); this.generatePets(builder); builder.setAveragePurchaseTriggerTime(this.purchaseTriggerTimeSampler.sample()); builder.setAverageTransactionTriggerTime(this.transactionTriggerTimeSampler.sample()); return builder.build(); } CustomerTransactionParametersSampler(Sampler<Integer> nPetsSampler,
			Sampler<PetSpecies> petSpeciesSampler,
			Sampler<Double> purchaseTriggerTimeSampler,
			Sampler<Double> transactionTriggerTimeSampler); CustomerTransactionParameters sample();  }### Answer:
@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); }