@Test
public void testDoesInstructionHaveUpdateLinkToCompareInstruction()
{

  final MedicationOrderComposition composition1 =
      MedicationsTestUtils.buildTestMedicationOrderComposition("uid1::1", null, null);
  final MedicationOrderComposition composition2 = MedicationsTestUtils.
      buildTestMedicationOrderComposition("uid2::1", null, null);
  final MedicationInstructionInstruction instruction1 =
      MedicationsTestUtils.buildTestMedicationInstruction("MedicationInstructionInstruction 1");
  composition1.getMedicationDetail().getMedicationInstruction().add(instruction1);
  final MedicationInstructionInstruction instruction2 =
      MedicationsTestUtils.buildTestMedicationInstruction("MedicationInstructionInstruction 2");
  composition2.getMedicationDetail().getMedicationInstruction().add(instruction2);
  final Link linkToInstruction1 =
      OpenEhrRefUtils.getLinkToTdoTarget("update", EhrLinkType.UPDATE.getName(), composition1, instruction1);
  instruction2.getLinks().add(linkToInstruction1);
  assertTrue(
      medicationsBo.doesInstructionHaveLinkToCompareInstruction(
          instruction2, Pair.of(composition1, instruction1), EhrLinkType.UPDATE));
}