	@Test
	public void evaluate() throws Exception {

		Program hivProgram = MetadataUtils.existing(Program.class, HivMetadata._Program.HIV);
		Program tbProgram = MetadataUtils.existing(Program.class, TbMetadata._Program.TB);

		// Enroll patient #6 in TB program
		TestUtils.enrollInProgram(TestUtils.getPatient(6), tbProgram, TestUtils.date(2012, 1, 1));

		// Enroll patient #7 in HIV program
		TestUtils.enrollInProgram(TestUtils.getPatient(7), hivProgram, TestUtils.date(2012, 1, 1));

		// Enroll patient #8 in HIV program but also discontinue them
		TestUtils.enrollInProgram(TestUtils.getPatient(8), tbProgram, TestUtils.date(2012, 1, 1), TestUtils.date(2012, 6, 1));
		
		List<Integer> ptIds = Arrays.asList(6, 7, 8);
		Map<String, Object> params = new HashMap<String, Object>();
		params.put("program", hivProgram);
		CalculationResultMap resultMap = new InProgramCalculation().evaluate(ptIds, params, Context.getService(PatientCalculationService.class).createCalculationContext());
		Assert.assertFalse((Boolean) resultMap.get(6).getValue()); // Wrong program
		Assert.assertTrue((Boolean) resultMap.get(7).getValue());
		Assert.assertFalse((Boolean) resultMap.get(8).getValue()); // since discontinued
	}