DistanceVector { public DistanceElement getElement(long id) { if (!vector.containsKey(id)) vector.put(id, new DistanceElement(id)); return vector.get(id); } DistanceVector(long sourceId); DistanceElement getElement(long id); void printAll(); List<Long> getPath(long targetId); void printPathTo(long targetId); double getDistance(long targetId);  }
@Test public void testGetElement() { assertEquals(el, vector.getElement(1L)); }