public void encounterLocationTag_shouldShowRetiredLocationIfPreviouslySelected() throws Exception {
// create an encounter associated with a retired location
Location location = Context.getLocationService().getLocation(3);
Patient patient = Context.getPatientService().getPatient(2);
Encounter encounter = Context.getEncounterService().getEncounter(101);
// (sanity check)
Assert.assertTrue(location.isRetired());
// set the location on this encounter to the retired location
encounter.setLocation(location);
// now render a form using that encounter
HtmlForm htmlform = new HtmlForm();
htmlform.setXmlData( "<htmlform><encounterLocation /></htmlform>");
FormEntrySession session = new FormEntrySession(patient, encounter, FormEntryContext.Mode.EDIT, htmlform, null);