### Question:
Cake { public void setTopping(CakeTopping topping) { this.topping = topping; } Cake(); Long getId(); void setId(Long id); CakeTopping getTopping(); void setTopping(CakeTopping topping); Set<CakeLayer> getLayers(); void setLayers(Set<CakeLayer> layers); void addLayer(CakeLayer layer); @Override String toString();  }### Answer:
@Test public void testSetTopping() { final var cake = new Cake(); assertNull(cake.getTopping()); final var expectedTopping = new CakeTopping("DummyTopping", 1000); cake.setTopping(expectedTopping); assertEquals(expectedTopping, cake.getTopping()); }