@Test(expected = RuntimeException.class) public void testDeleteEvseThrowsException() { doThrow(mock(PersistenceException.class)).when(domainService).deleteEvse(CHARGING_STATION_TYPE_ID, EVSE_ID); resource.deleteEvse(CHARGING_STATION_TYPE_ID, EVSE_ID); }
@DELETE @Path("/{id: [0-9]+}") public Response deleteEvse(@PathParam("chargingStationTypeId") Long chargingStationTypeId, @PathParam("id") Long id) { domainService.deleteEvse(chargingStationTypeId, id); return Response.ok(id).build(); }
EvseResource { @DELETE @Path("/{id: [0-9]+}") public Response deleteEvse(@PathParam("chargingStationTypeId") Long chargingStationTypeId, @PathParam("id") Long id) { domainService.deleteEvse(chargingStationTypeId, id); return Response.ok(id).build(); } }
EvseResource { @DELETE @Path("/{id: [0-9]+}") public Response deleteEvse(@PathParam("chargingStationTypeId") Long chargingStationTypeId, @PathParam("id") Long id) { domainService.deleteEvse(chargingStationTypeId, id); return Response.ok(id).build(); }  }
EvseResource { @DELETE @Path("/{id: [0-9]+}") public Response deleteEvse(@PathParam("chargingStationTypeId") Long chargingStationTypeId, @PathParam("id") Long id) { domainService.deleteEvse(chargingStationTypeId, id); return Response.ok(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 { @DELETE @Path("/{id: [0-9]+}") public Response deleteEvse(@PathParam("chargingStationTypeId") Long chargingStationTypeId, @PathParam("id") Long id) { domainService.deleteEvse(chargingStationTypeId, id); return Response.ok(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);  }