### Question:
NotificationGenerator { public List<Notification> generate(final HealthData healthData, final List<HealthDataValue> filteredValues) { final List<Notification> generated = new ArrayList<Notification>(); final Patient patient = healthData.getPatient(); final List<Doctor> doctors = patient.getDoctors(); for (final Doctor doctor : doctors) { final List<Notification> doctorNotifications = createNotifications(filteredValues, patient, doctor); generated.addAll(doctorNotifications); } return generated; }  List<Notification> generate(final HealthData healthData,
            final List<HealthDataValue> filteredValues);  }### Answer:
@Test public void allDoctorsDisabledForNotificationGetNothing() throws Exception { final Doctor doctor1 = createDoctor(false, false); final Doctor doctor2 = createDoctor(false, false); setDoctors(doctor1, doctor2); final HealthData healthData = createHealthData(); final List<HealthDataValue> filteredValues = createDummyFilteredValues(); final List<Notification> result = generator.generate(healthData, filteredValues); Assert.assertEquals(0, result.size()); }
@Test public void allDoctorEnabledForAllNotificationGet8() throws Exception { final Doctor doctor1 = createDoctor(true, true); final Doctor doctor2 = createDoctor(true, true); setDoctors(doctor1, doctor2); final HealthData healthData = createHealthData(); final List<HealthDataValue> filteredValues = createDummyFilteredValues(); final List<Notification> result = generator.generate(healthData, filteredValues); Assert.assertEquals(2 * 2 * 2, result.size()); }
@Test public void oneDoctorEnabledForTwoTypeNotificationsGet4() throws Exception { final Doctor doctor1 = createDoctor(true, true); final Doctor doctor2 = createDoctor(false, false); setDoctors(doctor1, doctor2); final HealthData healthData = createHealthData(); final List<HealthDataValue> filteredValues = createDummyFilteredValues(); final List<Notification> result = generator.generate(healthData, filteredValues); Assert.assertEquals(2 * 2, result.size()); }