### Question:
AbstractJaxRsResourceProvider extends AbstractJaxRsProvider implements IRestfulServer<JaxRsRequest>, IResourceProvider { @PUT @Path("/{id}") public Response update(@PathParam("id") final String id, final String resource) throws IOException { return execute(getResourceRequest(RequestTypeEnum.PUT, RestOperationTypeEnum.UPDATE).id(id).resource(resource)); } protected  AbstractJaxRsResourceProvider(); protected  AbstractJaxRsResourceProvider(final FhirContext ctx); protected  AbstractJaxRsResourceProvider(final Class<? extends AbstractJaxRsProvider> theProviderClass); protected  AbstractJaxRsResourceProvider(final FhirContext ctx, final Class<? extends AbstractJaxRsProvider> theProviderClass); @Override String getBaseForRequest(); @POST Response create(final String resource); @POST @Path("/_search") Response searchWithPost(); @GET Response search(); @PUT Response conditionalUpdate(final String resource); @PUT @Path("/{id}") Response update(@PathParam("id") final String id, final String resource); @DELETE Response delete(); @DELETE @Path("/{id}") Response delete(@PathParam("id") final String id); @GET @Path("/{id : ((?!_history).)*}") Response find(@PathParam("id") final String id); @GET @Path("/{id}/_history/{version}") Response findVersion(@PathParam("id") final String id, @PathParam("version") final String version); @GET @Path("/{id}/_history") Response historyForInstance(@PathParam("id") final String id); @GET @Path("/_history") Response historyForType(); @GET @Path("/{id}/{compartment : ((?!_history).)*}") Response findCompartment(@PathParam("id") final String id, @PathParam("compartment") final String compartment); @POST @Path("/$validate") Response validate(final String resource); @Override IPagingProvider getPagingProvider(); @Override BundleInclusionRule getBundleInclusionRule(); @Override PreferReturnEnum getDefaultPreferReturn(); @Override abstract Class<R> getResourceType(); JaxRsMethodBindings getBindings();  }### Answer:
@Test public void testUpdateById() throws Exception { when(mock.update(idCaptor.capture(), patientCaptor.capture(), conditionalCaptor.capture())).thenReturn(new MethodOutcome()); client.update("1", createPatient(1)); assertEquals("1", idCaptor.getValue().getIdPart()); compareResultId(1, patientCaptor.getValue()); }
@SuppressWarnings("unchecked") @Disabled @Test public void testResourceNotFound() throws Exception { when(mock.update(idCaptor.capture(), patientCaptor.capture(), conditionalCaptor.capture())).thenThrow(ResourceNotFoundException.class); try { client.update("1", createPatient(2)); fail(); } catch (ResourceNotFoundException e) { } }