@Test public void addLinkTest() { PowerMeasurement powerMeasurement = new PowerMeasurement(); assertEquals(null, powerMeasurement.getLinks()); Link link = new Link(); powerMeasurement.addLink(link); assertEquals(link, powerMeasurement.getLinks().get(0)); }
public void addLink(Link link) { if(links==null) links = new ArrayList<Link>(); links.add(link); }
PowerMeasurement { public void addLink(Link link) { if(links==null) links = new ArrayList<Link>(); links.add(link); } }
PowerMeasurement { public void addLink(Link link) { if(links==null) links = new ArrayList<Link>(); links.add(link); }  }
PowerMeasurement { 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); }
PowerMeasurement { 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);  }