@Test(expected = RuntimeException.class) public void getConnectorThrowsException() { when(domainService.getConnector(CHARGING_STATION_TYPE_ID, EVSE_ID, CONNECTOR_ID)).thenThrow(mock(EntityNotFoundException.class)); resource.getConnector(CHARGING_STATION_TYPE_ID, EVSE_ID, CONNECTOR_ID); }
@GET @Path("/{id: [0-9]+}") public Response getConnector(@PathParam("chargingStationTypeId") Long chargingStationTypeId, @PathParam("evseId") Long evseId, @PathParam("id") Long id) { return Response.ok(domainService.getConnector(chargingStationTypeId, evseId, id)).build(); }
ConnectorResource { @GET @Path("/{id: [0-9]+}") public Response getConnector(@PathParam("chargingStationTypeId") Long chargingStationTypeId, @PathParam("evseId") Long evseId, @PathParam("id") Long id) { return Response.ok(domainService.getConnector(chargingStationTypeId, evseId, id)).build(); } }
ConnectorResource { @GET @Path("/{id: [0-9]+}") public Response getConnector(@PathParam("chargingStationTypeId") Long chargingStationTypeId, @PathParam("evseId") Long evseId, @PathParam("id") Long id) { return Response.ok(domainService.getConnector(chargingStationTypeId, evseId, id)).build(); }  }
ConnectorResource { @GET @Path("/{id: [0-9]+}") public Response getConnector(@PathParam("chargingStationTypeId") Long chargingStationTypeId, @PathParam("evseId") Long evseId, @PathParam("id") Long id) { return Response.ok(domainService.getConnector(chargingStationTypeId, evseId, id)).build(); }  @GET Response getConnectors(@PathParam("chargingStationTypeId") Long chargingStationTypeId, @PathParam("evseId") Long evseId); @POST @Consumes(ApiVersion.V1_JSON) Response createConnector(@PathParam("chargingStationTypeId") Long chargingStationTypeId, @PathParam("evseId") Long evseId, Connector connector); @PUT @Path("/{id: [0-9]+}") @Consumes(ApiVersion.V1_JSON) Response updateConnector(@PathParam("chargingStationTypeId") Long chargingStationTypeId, @PathParam("evseId") Long evseId, @PathParam("id") Long id, Connector connector); @GET @Path("/{id: [0-9]+}") Response getConnector(@PathParam("chargingStationTypeId") Long chargingStationTypeId, @PathParam("evseId") Long evseId, @PathParam("id") Long id); @DELETE @Path("/{id: [0-9]+}") Response deleteConnector(@PathParam("chargingStationTypeId") Long chargingStationTypeId, @PathParam("evseId") Long evseId, @PathParam("id") Long id); void setDomainService(DomainService domainService); }
ConnectorResource { @GET @Path("/{id: [0-9]+}") public Response getConnector(@PathParam("chargingStationTypeId") Long chargingStationTypeId, @PathParam("evseId") Long evseId, @PathParam("id") Long id) { return Response.ok(domainService.getConnector(chargingStationTypeId, evseId, id)).build(); }  @GET Response getConnectors(@PathParam("chargingStationTypeId") Long chargingStationTypeId, @PathParam("evseId") Long evseId); @POST @Consumes(ApiVersion.V1_JSON) Response createConnector(@PathParam("chargingStationTypeId") Long chargingStationTypeId, @PathParam("evseId") Long evseId, Connector connector); @PUT @Path("/{id: [0-9]+}") @Consumes(ApiVersion.V1_JSON) Response updateConnector(@PathParam("chargingStationTypeId") Long chargingStationTypeId, @PathParam("evseId") Long evseId, @PathParam("id") Long id, Connector connector); @GET @Path("/{id: [0-9]+}") Response getConnector(@PathParam("chargingStationTypeId") Long chargingStationTypeId, @PathParam("evseId") Long evseId, @PathParam("id") Long id); @DELETE @Path("/{id: [0-9]+}") Response deleteConnector(@PathParam("chargingStationTypeId") Long chargingStationTypeId, @PathParam("evseId") Long evseId, @PathParam("id") Long id); void setDomainService(DomainService domainService);  }