@Test public void testSetId() { final Cake cake = new Cake(); assertNull(cake.getId()); final Long expectedId = Long.valueOf(1234L); cake.setId(expectedId); assertEquals(expectedId, cake.getId()); }
public void setId(Long id) { this.id = id; }
Cake { public void setId(Long id) { this.id = id; } }
Cake { public void setId(Long id) { this.id = id; } Cake(); }
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(); final void setLayers(Set<CakeLayer> layers); void addLayer(CakeLayer layer); @Override String toString(); }
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(); final void setLayers(Set<CakeLayer> layers); void addLayer(CakeLayer layer); @Override String toString();  }