### Question:
CustomerTransactionParameters { public int countPetsBySpecies(PetSpecies species) { return petCounts.count(species); } CustomerTransactionParameters(Multiset<PetSpecies> petCounts,
			double averageTransactionTriggerTime, double averagePurchaseTriggerTime); double getAverageTransactionTriggerTime(); double getAveragePurchaseTriggerTime(); int countPetsBySpecies(PetSpecies species); int countPetsBySpecies(Collection<PetSpecies> allSpecies); int countPets();  }### Answer:
@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); }