@Test
public void testApplyRuleWithNoPatientWeight() throws Exception
{

  final Locale locale = new Locale("en");
  final ParacetamolRuleForTherapyParameters parameters = new ParacetamolRuleForTherapyParameters();
  parameters.setMedicationParacetamolRuleType(MedicationParacetamolRuleType.FOR_THERAPY);
  parameters.setMedicationDataDtoList(Collections.singletonList(new MedicationDataDto()));
  parameters.setTherapyDto(new ConstantComplexTherapyDto());
  final String errorMessage = "Patient weight is not known, could not apply paracetamol rule.";
  final ParacetamolRuleResult paracetamolRuleResult = paracetamolRule.applyRule(parameters, new DateTime(), locale);
  assertTrue(!paracetamolRuleResult.isQuantityOk());
  assertEquals(errorMessage, paracetamolRuleResult.getErrorMessage());
}