### Question:
Cake { public void setId(Long id) { this.id = id; } 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 testSetId() { final var cake = new Cake(); assertNull(cake.getId()); final var expectedId = 1234L; cake.setId(expectedId); assertEquals(expectedId, cake.getId()); }