ProductCartDao extends HibernateDao<ProductCart, String> { public void deleteCartOfUser(User user) { ProductCart cart = getCartOfUser(user); if (cart != null) { delete(cart); } }  @SuppressWarnings("unchecked") ProductCart getCartOfUser(final User user); void deleteCartOfUser(User user); void deleteProductReferences(final Product product); List<Product> scrollCartOfUser(final User user, final int skip, final int top); List<Long> getProductsIdOfCart(User user);  }
@Test public void deleteCartOfUser() { User u = new User(); u.setUUID("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa2"); dao.deleteCartOfUser(u); ProductCart res = dao.getCartOfUser(u); assertNull(res); }