### Question:
TodoGatewayResource { @DELETE @Path("/{id}") public Response deleteTodo(@PathParam("id") final Long todoId) { LOG.info("Request deleteTodo todo with id {}", todoId); Response response = repository.deleteTodo(todoId); return Response.fromResponse(response).build(); }  @POST Response createTodo(final String newTodo); @DELETE @Path("/{id}") Response deleteTodo(@PathParam("id") final Long todoId); @GET @Path("/{id}") Response getTodo(@PathParam("id") final Long todoId); @GET @Operation(description = "Find all todos") Response getTodos(); @PUT @Path("/{id}") Response updateTodo(@PathParam("id") final Long todoId, final String modifiedTodo);  }### Answer:
@Test public void deleteTodo() { Mockito.when(response.getStatus()).thenReturn(Response.Status.NO_CONTENT.getStatusCode()); Mockito.when(response.getEntity()).thenReturn(""); Mockito.when(service.deleteTodo(Mockito.anyLong())).thenReturn(response); Response response = resource.deleteTodo(1L); assertThat(response.getStatus()).isEqualTo(Response.Status.NO_CONTENT.getStatusCode()); assertThat(response.getEntity()).isEqualTo(""); Mockito.verify(service).deleteTodo(Mockito.anyLong()); Mockito.verifyNoMoreInteractions(service); }