@Test
public void testFillInfusionFormulaFromRate1()
{

  final ConstantComplexTherapyDto therapy = new ConstantComplexTherapyDto();
  therapy.setContinuousInfusion(false);
  final ComplexDoseElementDto doseElement = new ComplexDoseElementDto();
  therapy.setDoseElement(doseElement);
  doseElement.setRateFormulaUnit("mg/kg/h");
  doseElement.setRate(10.0);
  final InfusionIngredientDto ingredient = new InfusionIngredientDto();
  therapy.getIngredientsList().add(ingredient);
  ingredient.setQuantityUnit("mg");
  ingredient.setQuantity(10.0);
  ingredient.setQuantityDenominator(5.0);
  final MedicationDto medication = new MedicationDto();
  ingredient.setMedication(medication);
  medication.setMedicationType(MedicationTypeEnum.MEDICATION);
  medicationsBo.fillInfusionFormulaFromRate(therapy, 10.0, 70.0);
  assertEquals(new Double(2.0), therapy.getDoseElement().getRateFormula());
}