@Test(expected = RuntimeException.class) public void testGetEvseThrowsException() { when(domainService.getEvse(CHARGING_STATION_TYPE_ID, EVSE_ID)).thenThrow(mock(EntityNotFoundException.class)); resource.getEvse(CHARGING_STATION_TYPE_ID, EVSE_ID); }
@GET @Path("/{id: [0-9]+}") public Response getEvse(@PathParam("chargingStationTypeId") Long chargingStationTypeId, @PathParam("id") Long id) { return Response.ok(domainService.getEvse(chargingStationTypeId, id)).build(); }
EvseResource { @GET @Path("/{id: [0-9]+}") public Response getEvse(@PathParam("chargingStationTypeId") Long chargingStationTypeId, @PathParam("id") Long id) { return Response.ok(domainService.getEvse(chargingStationTypeId, id)).build(); } }
EvseResource { @GET @Path("/{id: [0-9]+}") public Response getEvse(@PathParam("chargingStationTypeId") Long chargingStationTypeId, @PathParam("id") Long id) { return Response.ok(domainService.getEvse(chargingStationTypeId, id)).build(); }  }
EvseResource { @GET @Path("/{id: [0-9]+}") public Response getEvse(@PathParam("chargingStationTypeId") Long chargingStationTypeId, @PathParam("id") Long id) { return Response.ok(domainService.getEvse(chargingStationTypeId, id)).build(); }  @GET Response getEvses(@PathParam("chargingStationTypeId") Long chargingStationTypeId); @POST @Consumes(ApiVersion.V1_JSON) Response createEvse(@PathParam("chargingStationTypeId") Long chargingStationTypeId, Evse evse); @PUT @Path("/{id: [0-9]+}") @Consumes(ApiVersion.V1_JSON) Response updateEvse(@PathParam("chargingStationTypeId") Long chargingStationTypeId, @PathParam("id") Long id, Evse evse); @GET @Path("/{id: [0-9]+}") Response getEvse(@PathParam("chargingStationTypeId") Long chargingStationTypeId, @PathParam("id") Long id); @DELETE @Path("/{id: [0-9]+}") Response deleteEvse(@PathParam("chargingStationTypeId") Long chargingStationTypeId, @PathParam("id") Long id); void setDomainService(DomainService domainService); }
EvseResource { @GET @Path("/{id: [0-9]+}") public Response getEvse(@PathParam("chargingStationTypeId") Long chargingStationTypeId, @PathParam("id") Long id) { return Response.ok(domainService.getEvse(chargingStationTypeId, id)).build(); }  @GET Response getEvses(@PathParam("chargingStationTypeId") Long chargingStationTypeId); @POST @Consumes(ApiVersion.V1_JSON) Response createEvse(@PathParam("chargingStationTypeId") Long chargingStationTypeId, Evse evse); @PUT @Path("/{id: [0-9]+}") @Consumes(ApiVersion.V1_JSON) Response updateEvse(@PathParam("chargingStationTypeId") Long chargingStationTypeId, @PathParam("id") Long id, Evse evse); @GET @Path("/{id: [0-9]+}") Response getEvse(@PathParam("chargingStationTypeId") Long chargingStationTypeId, @PathParam("id") Long id); @DELETE @Path("/{id: [0-9]+}") Response deleteEvse(@PathParam("chargingStationTypeId") Long chargingStationTypeId, @PathParam("id") Long id); void setDomainService(DomainService domainService);  }