### Question:
Warehouse { public void addProduct(String name, int price) throws WarehouseException { if (price < 0) { throw new IllegalArgumentException("The product's price cannot be negative."); } Product product = new Product(name, price); productDao.addProduct(product); } Warehouse(
        ProductDao productDao,
        CustomerDao customerDao,
        InventoryDao inventoryDao,
        OrderDao orderDao,
        ReportGeneration reportGeneration,
        ExternalCustomerService externalCustomerService); Collection<Product> getProducts(); Collection<Customer> getCustomers(); Collection<Order> getOrders(); void addProduct(String name, int price); void addOrder(int customerId, Map<Integer, Integer> quantities); Report generateReport(Report.Type type);  }### Answer:
@Test void cantAddProductWithNegativePrice() { String name = "test"; int price = -123; assertThrows(IllegalArgumentException.class, () -> warehouse.addProduct(name, price)); }