@Test public void testRemoveProduct() { Product productFirst = new Product("manufacturer", "title", 0.5); Product productFake = new Product("manufacturer", "fake", 0.75); productStorage.add(productFirst); String expected = String.format("The product %s is absent in Product Storage", productFake.getTitle()); try { productStorage.remove(productFake); } catch (IllegalArgumentException e) { assertEquals(expected, e.getMessage()); } }