### Question:
WayHelper { public List<Node> getNodes(final Way aWay) { return getNodes(aWay.getWayNodes()); } WayHelper(final IDataSet aMap); IDataSet getMap(); static String getTag(final Collection<Tag> way, final String key); static String getTag(final Entity way, final String key); List<Node> getNodes(final Way aWay); List<Node> getNodes(final List<WayNode> aWay); Bounds getWayBounds(final Way way); Bounds getWayBounds(final Collection<Way> ways); List<WayNode> simplifyWay(final Way w); List<WayNode> simplifyWay(final Way w, final double threshold,
            final double maxNodeDistance,
            final boolean keepTaggedNodes,
            final boolean keepIntersectionNodes); List<WayNode> simplifyWay(final List<WayNode> wnew, final double threshold,
            final double minNodeDistance,
            final boolean keepTaggedNodes,
            final boolean keepIntersectionNodes); void simplifyWayRange(final List<WayNode> aWay, final int from,
                                 final int to,
                                 final double thr,
                                 final double minDist); static Bounds getBoundsForWay(final Way street, final IDataSet aMap); static boolean isPolygon(final Way aWay); static boolean isOneway(final Way way); static boolean isReverseOneway(final Way way); static boolean isBridge(final Way way); static long areaBoundingBox(final ExtendedWay way); static double area(final Coordinate[] polyPoints); static double[] centerOfMass(final Coordinate[] polyPoints); static boolean containsNode(final Way aToWay, final long aNodeID); static List<Node> isParallel(final List<Node> aFirstWay, final List<Node> aSecondWay); static double getDistanceAndInsert(final Node aNode, final List<Node> aWay); static double getDistance(final Node aNode, final Node aStart, final Node aEnd);  }### Answer:
@Test public void testGetNodes() { MemoryDataSet map = new MemoryDataSet(); WayHelper subject = new WayHelper(map); Way way0 = new Way(1L, 0, new Date(), null, 0); way0.getWayNodes().add(new WayNode(1L)); way0.getWayNodes().add(new WayNode(2L)); Node node0 = new Node(1L, 0, new Date(), null, 0, 1.0, 1.0); Node node1 = new Node(2L, 0, new Date(), null, 0, 2.0, 2.0); map.addNode(node0); map.addNode(node1); map.addWay(way0); List<Node> nodes = subject.getNodes(way0); assertNotNull(nodes); assertEquals(nodes.size(), 2); Node n0 = nodes.get(0); Node n1 = nodes.get(1); assertNotNull(n0); assertNotNull(n0); if (n0 == node0) { assertSame(node1, n1); } else { assertSame(node1, n0); } }