/**
   * @see RadiologyEncounterMatcher#findEncounter(Visit,EncounterParameters)
   * @verifies return null given visit without non voided encounters
   */
  @Test
  public void findEncounter_shouldReturnNullGivenVisitWithoutNonVoidedEncounters()
      throws Exception {
    // given
    EncounterParameters encounterParameters =
        EncounterParameters.instance()
            .setEncounterType(radiologyProperties.getRadiologyOrderEncounterType());
    Visit visit = visitService.getVisit(VISIT_ID_WITHOUT_ENCOUNTER);

    Encounter encounter = radiologyEncounterMatcher.findEncounter(visit, encounterParameters);

    assertThat(encounter, is(nullValue()));
  }
  /**
   * @see RadiologyEncounterMatcher#findEncounter(Visit,EncounterParameters)
   * @verifies throw illegal argument exception if given visit is null
   */
  @Test
  public void findEncounter_shouldThrowIllegalArgumentExceptionIfGivenVisitIsNull()
      throws Exception {
    // given
    EncounterParameters encounterParameters =
        EncounterParameters.instance()
            .setEncounterType(radiologyProperties.getRadiologyOrderEncounterType())
            .setEncounterUuid(VOIDED_ENCOUNTER_UUID);

    expectedException.expect(IllegalArgumentException.class);
    expectedException.expectMessage("visit is required");
    radiologyEncounterMatcher.findEncounter(null, encounterParameters);
  }
  /**
   * @see RadiologyEncounterMatcher#findEncounter(Visit,EncounterParameters)
   * @verifies return null if encounter uuid given by encounter parameters is voided
   */
  @Test
  public void findEncounter_shouldReturnNullIfEncounterUuidGivenByEncounterParametersIsVoided()
      throws Exception {
    // given
    EncounterParameters encounterParameters =
        EncounterParameters.instance()
            .setEncounterType(radiologyProperties.getRadiologyOrderEncounterType())
            .setEncounterUuid(VOIDED_ENCOUNTER_UUID);
    Visit visit = visitService.getVisit(VISIT_ID_WITH_VOIDED_ENCOUNTER);

    Encounter encounter = radiologyEncounterMatcher.findEncounter(visit, encounterParameters);

    assertThat(encounter, is(nullValue()));
  }