BasketController { @DeleteMapping("/baskets/{id}") void deleteBasket(@PathVariable UUID id) { BasketModel basketModel = one(id); basketRepository.delete(basketModel); } @Autowired  BasketController(BasketRepository basketRepository);   }
@Test(expected = BasketNotFoundException.class) public void deleteBasket() { BasketModel basketModel = getMockedBasketModel("dummy"); BasketModel result = basketController.newBasket(basketModel); basketController.deleteBasket(result.getId()); basketController.one(result.getId()); }