@Test(expected = RuntimeException.class) public void testDeleteChargingStationTypeThrowsException() { doThrow(mock(PersistenceException.class)).when(repository).delete(anyLong()); resource.deleteChargingStationType(anyLong()); }
@DELETE @Path("/{id: [0-9]+}") public Response deleteChargingStationType(@PathParam("id") Long id) { domainService.deleteChargingStationType(id); return Response.ok(id).build(); }
ChargingStationTypeResource { @DELETE @Path("/{id: [0-9]+}") public Response deleteChargingStationType(@PathParam("id") Long id) { domainService.deleteChargingStationType(id); return Response.ok(id).build(); } }
ChargingStationTypeResource { @DELETE @Path("/{id: [0-9]+}") public Response deleteChargingStationType(@PathParam("id") Long id) { domainService.deleteChargingStationType(id); return Response.ok(id).build(); }  }
ChargingStationTypeResource { @DELETE @Path("/{id: [0-9]+}") public Response deleteChargingStationType(@PathParam("id") Long id) { domainService.deleteChargingStationType(id); return Response.ok(id).build(); }  @POST @Consumes(ApiVersion.V1_JSON) Response createChargingStationType(ChargingStationType chargingStationType); @PUT @Path("/{id: [0-9]+}") @Consumes(ApiVersion.V1_JSON) Response updateChargingStationType(@PathParam("id") Long id, ChargingStationType chargingStationType); @GET Response getChargingStationTypes(@Context HttpServletRequest request, @QueryParam(OFFSET_PARAMETER) @DefaultValue(OFFSET_DEFAULT) int offset, @QueryParam(LIMIT_PARAMETER) @DefaultValue(LIMIT_DEFAULT) int limit); @GET @Path("/{id: [0-9]+}") Response getChargingStationType(@PathParam("id") Long id); @DELETE @Path("/{id: [0-9]+}") Response deleteChargingStationType(@PathParam("id") Long id); void setDomainService(DomainService domainService); }
ChargingStationTypeResource { @DELETE @Path("/{id: [0-9]+}") public Response deleteChargingStationType(@PathParam("id") Long id) { domainService.deleteChargingStationType(id); return Response.ok(id).build(); }  @POST @Consumes(ApiVersion.V1_JSON) Response createChargingStationType(ChargingStationType chargingStationType); @PUT @Path("/{id: [0-9]+}") @Consumes(ApiVersion.V1_JSON) Response updateChargingStationType(@PathParam("id") Long id, ChargingStationType chargingStationType); @GET Response getChargingStationTypes(@Context HttpServletRequest request, @QueryParam(OFFSET_PARAMETER) @DefaultValue(OFFSET_DEFAULT) int offset, @QueryParam(LIMIT_PARAMETER) @DefaultValue(LIMIT_DEFAULT) int limit); @GET @Path("/{id: [0-9]+}") Response getChargingStationType(@PathParam("id") Long id); @DELETE @Path("/{id: [0-9]+}") Response deleteChargingStationType(@PathParam("id") Long id); void setDomainService(DomainService domainService);  }