### Question:
EdgeWrapper { public void clear() { refCounter = 0; Arrays.fill(weights, 0); Arrays.fill(nodes, 0); Arrays.fill(parents, 0); Arrays.fill(edgeIds, EdgeIterator.NO_EDGE); node2ref.clear(); } EdgeWrapper();  EdgeWrapper( int size ); int add( int nodeId, double distance, int edgeId ); void putWeight( int ref, double dist ); void putEdgeId( int ref, int edgeId ); void putParent( int ref, int link ); double getWeight( int ref ); int getNode( int ref ); int getParent( int ref ); int getEdgeId( int ref ); void clear(); int getRef( int node ); boolean isEmpty();  }### Answer:
@Test public void testClear() { EdgeWrapper instance = new EdgeWrapper(5); assertEquals(0, instance.add(1, 10, 10)); instance.add(2, 20, 20); instance.add(3, 30, 30); instance.clear(); assertEquals(0, instance.add(1, 10, 10)); }