### Question:
OSMWay extends OSMEntity implements Comparable<OSMWay>, Serializable { @Override public String toString() { return String.format("WAY-> %s Refs:%s", super.toString(), Arrays.toString(getRefs())); } OSMWay(final long id, final int version, final OSHDBTimestamp timestamp, final long changeset,
      final int userId, final int[] tags, final OSMMember[] refs); @Override OSMType getType(); OSMMember[] getRefs(); Stream<OSMNode> getRefEntities(OSHDBTimestamp timestamp); @Override String toString(); @Override int compareTo(OSMWay o);  }### Answer:
@Test public void testToString() { OSMMember part = new OSMMember(1L, OSMType.NODE, 1); OSMWay instance = new OSMWay(1L, 1, new OSHDBTimestamp(1L), 1L, 1, new int[] {}, new OSMMember[] {part, part}); String expResult = "WAY-> ID:1 V:+1+ TS:1 CS:1 VIS:true UID:1 TAGS:[] Refs:[T:NODE ID:1 R:1, T:NODE ID:1 R:1]"; String result = instance.toString(); assertEquals(expResult, result); instance = new OSMWay(1L, 1, new OSHDBTimestamp(1L), 1L, 1, new int[] {1, 1, 2, 2}, new OSMMember[] {}); expResult = "WAY-> ID:1 V:+1+ TS:1 CS:1 VIS:true UID:1 TAGS:[1, 1, 2, 2] Refs:[]"; result = instance.toString(); assertEquals(expResult, result); instance = new OSMWay(1L, 1, new OSHDBTimestamp(1L), 1L, 1, new int[] {}, null); expResult = "WAY-> ID:1 V:+1+ TS:1 CS:1 VIS:true UID:1 TAGS:[] Refs:null"; result = instance.toString(); assertEquals(expResult, result); }