@Test public void testListPossibleWithApprovedReceivers() { when(certificateReceiverService.listPossibleReceiversWithApprovedInfo("LISJP", INTYG_ID)).thenReturn(buildReceiverList()); Response resp = receiverApiController.listApprovedReceivers("LISJP", INTYG_ID); assertNotNull(resp); assertEquals(200, resp.getStatus()); verify(certificateReceiverService, times(1)).listPossibleReceiversWithApprovedInfo("LISJP", INTYG_ID); }
@GET @Path("/approvedreceivers/{intygsTyp}/{intygsId}") @Produces(MediaType.APPLICATION_JSON + UTF_8_CHARSET) @PrometheusTimeMethod public Response listApprovedReceivers(@PathParam("intygsTyp") String intygsTyp, @PathParam("intygsId") String intygsId) { List<IntygReceiver> intygReceivers = certificateReceiverService.listPossibleReceiversWithApprovedInfo(intygsTyp, intygsId); return Response.ok(intygReceivers).build(); }
ReceiverApiController extends AbstractApiController { @GET @Path("/approvedreceivers/{intygsTyp}/{intygsId}") @Produces(MediaType.APPLICATION_JSON + UTF_8_CHARSET) @PrometheusTimeMethod public Response listApprovedReceivers(@PathParam("intygsTyp") String intygsTyp, @PathParam("intygsId") String intygsId) { List<IntygReceiver> intygReceivers = certificateReceiverService.listPossibleReceiversWithApprovedInfo(intygsTyp, intygsId); return Response.ok(intygReceivers).build(); } }
ReceiverApiController extends AbstractApiController { @GET @Path("/approvedreceivers/{intygsTyp}/{intygsId}") @Produces(MediaType.APPLICATION_JSON + UTF_8_CHARSET) @PrometheusTimeMethod public Response listApprovedReceivers(@PathParam("intygsTyp") String intygsTyp, @PathParam("intygsId") String intygsId) { List<IntygReceiver> intygReceivers = certificateReceiverService.listPossibleReceiversWithApprovedInfo(intygsTyp, intygsId); return Response.ok(intygReceivers).build(); }  }
ReceiverApiController extends AbstractApiController { @GET @Path("/approvedreceivers/{intygsTyp}/{intygsId}") @Produces(MediaType.APPLICATION_JSON + UTF_8_CHARSET) @PrometheusTimeMethod public Response listApprovedReceivers(@PathParam("intygsTyp") String intygsTyp, @PathParam("intygsId") String intygsId) { List<IntygReceiver> intygReceivers = certificateReceiverService.listPossibleReceiversWithApprovedInfo(intygsTyp, intygsId); return Response.ok(intygReceivers).build(); }  @GET @Path("/approvedreceivers/{intygsTyp}/{intygsId}") @Produces(MediaType.APPLICATION_JSON + UTF_8_CHARSET) @PrometheusTimeMethod Response listApprovedReceivers(@PathParam("intygsTyp") String intygsTyp, @PathParam("intygsId") String intygsId); @GET @Path("/possiblereceivers/{intygsTyp}") @Produces(MediaType.APPLICATION_JSON + UTF_8_CHARSET) @PrometheusTimeMethod Response listApprovedReceivers(@PathParam("intygsTyp") String intygsTyp); @POST @Path("/registerapproved/{intygsTyp}/{intygsId}") @Produces(MediaType.APPLICATION_JSON + UTF_8_CHARSET) @Consumes(MediaType.APPLICATION_JSON + UTF_8_CHARSET) @PrometheusTimeMethod Response registerApprovedReceivers(@PathParam("intygsTyp") String intygsTyp, @PathParam("intygsId") String intygsId,
        List<String> receiverIds); }
ReceiverApiController extends AbstractApiController { @GET @Path("/approvedreceivers/{intygsTyp}/{intygsId}") @Produces(MediaType.APPLICATION_JSON + UTF_8_CHARSET) @PrometheusTimeMethod public Response listApprovedReceivers(@PathParam("intygsTyp") String intygsTyp, @PathParam("intygsId") String intygsId) { List<IntygReceiver> intygReceivers = certificateReceiverService.listPossibleReceiversWithApprovedInfo(intygsTyp, intygsId); return Response.ok(intygReceivers).build(); }  @GET @Path("/approvedreceivers/{intygsTyp}/{intygsId}") @Produces(MediaType.APPLICATION_JSON + UTF_8_CHARSET) @PrometheusTimeMethod Response listApprovedReceivers(@PathParam("intygsTyp") String intygsTyp, @PathParam("intygsId") String intygsId); @GET @Path("/possiblereceivers/{intygsTyp}") @Produces(MediaType.APPLICATION_JSON + UTF_8_CHARSET) @PrometheusTimeMethod Response listApprovedReceivers(@PathParam("intygsTyp") String intygsTyp); @POST @Path("/registerapproved/{intygsTyp}/{intygsId}") @Produces(MediaType.APPLICATION_JSON + UTF_8_CHARSET) @Consumes(MediaType.APPLICATION_JSON + UTF_8_CHARSET) @PrometheusTimeMethod Response registerApprovedReceivers(@PathParam("intygsTyp") String intygsTyp, @PathParam("intygsId") String intygsId,
        List<String> receiverIds);  }