### Question:
EnergyMeasurement { public void addLink(Link link) { if(links==null) links = new ArrayList<Link>(); links.add(link); }  Double getValue(); void setValue(Double value); String getDescription(); void setDescription(String description); String getHref(); void setHref(String href); List<Link> getLinks(); void setLinks(List<Link> links); void addLink(Link link);  }### Answer:
@Test public void addLinkTest() { EnergyMeasurement energyMeasurement = new EnergyMeasurement(); assertEquals(null, energyMeasurement.getLinks()); Link link = new Link(); energyMeasurement.addLink(link); assertEquals(link, energyMeasurement.getLinks().get(0)); }