Just logging in unit test

This commit is contained in:
James Agnew 2014-09-16 17:16:03 -04:00
parent 49726fb17c
commit 774e38eacc
1 changed files with 5 additions and 0 deletions

View File

@ -69,6 +69,7 @@ import ca.uhn.fhir.rest.api.MethodOutcome;
import ca.uhn.fhir.rest.param.CodingListParam;
import ca.uhn.fhir.rest.param.DateParam;
import ca.uhn.fhir.rest.param.DateRangeParam;
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException;
import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException;
import ca.uhn.fhir.rest.server.provider.ServerProfileProvider;
@ -1303,6 +1304,10 @@ public class ResfulServerMethodTest {
@Read(version=true)
public Patient vread(@IdParam IdDt theId) {
Patient retVal = getIdToPatient().get(theId.getIdPart());
if (retVal == null) {
throw new InternalErrorException("Couldn't find ID " + theId.getIdPart() + " - Valid IDs are: " + getIdToPatient().keySet());
}
List<HumanNameDt> name = retVal.getName();
HumanNameDt nameDt = name.get(0);
String value = theId.getVersionIdPart();