### Question:
Cake { public void setLayers(Set<CakeLayer> layers) { this.layers = layers; } 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 testSetLayers() { final var cake = new Cake(); assertNotNull(cake.getLayers()); assertTrue(cake.getLayers().isEmpty()); final var expectedLayers = Set.of( new CakeLayer("layer1", 1000), new CakeLayer("layer2", 2000), new CakeLayer("layer3", 3000)); cake.setLayers(expectedLayers); assertEquals(expectedLayers, cake.getLayers()); }