Try to get tests passing

This commit is contained in:
James Agnew 2017-08-22 08:44:35 -04:00
parent 265552989b
commit 83171292df
1 changed files with 2 additions and 0 deletions

View File

@ -79,6 +79,7 @@ public class ResourceProviderInterceptorDstu3Test extends BaseResourceProviderDs
private void resetServerInterceptor() throws ServletException, IOException {
reset(myServerInterceptor);
reset(myDaoInterceptor);
when(myServerInterceptor.handleException(any(RequestDetails.class), any(BaseServerResponseException.class), any(HttpServletRequest.class), any(HttpServletResponse.class))).thenReturn(true);
when(myServerInterceptor.incomingRequestPostProcessed(any(RequestDetails.class), any(HttpServletRequest.class), any(HttpServletResponse.class))).thenReturn(true);
when(myServerInterceptor.incomingRequestPreProcessed(any(HttpServletRequest.class), any(HttpServletResponse.class))).thenReturn(true);
@ -95,6 +96,7 @@ public class ResourceProviderInterceptorDstu3Test extends BaseResourceProviderDs
String resource = myFhirCtx.newXmlParser().encodeResourceToString(pt);
verify(myServerInterceptor, never()).incomingRequestPreHandled(any(RestOperationTypeEnum.class), any(ActionRequestDetails.class));
verify(myDaoInterceptor, never()).incomingRequestPreHandled(any(RestOperationTypeEnum.class), any(ActionRequestDetails.class));
HttpPost post = new HttpPost(ourServerBase + "/Patient");
post.setEntity(new StringEntity(resource, ContentType.create(Constants.CT_FHIR_XML, "UTF-8")));