### Question:
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);  }### Answer:
@Test public void testGetEvse() { Response response = resource.getEvse(CHARGING_STATION_TYPE_ID, EVSE_ID); verify(domainService).getEvse(CHARGING_STATION_TYPE_ID, EVSE_ID); assertNotNull(response); assertEquals(Response.Status.OK.getStatusCode(), response.getStatus()); }
@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); }