### Question:
DiskDGraph implements DGraph<String>, FastWalkable<String, DNode<String>> { @Override public Iterable<? extends DLink<String>> links() { return new LinkCollection(); } DiskDGraph(File dbFile);  DiskDGraph(File dbFile, boolean nullLabels); @Override int size(); @Override long numLinks(); @Override DNode<String> node(String label); @Override Collection<? extends DNode<String>> nodes(String label); @Override List<? extends DNode<String>> nodes(); @Override Iterable<? extends DLink<String>> links(); @Override DNode<String> add(String label); @Override Set<String> labels(); @Override boolean connected(String from, String to); @Override long state(); String toString(); void sort(); static DiskDGraph copy(Graph<String> graph, File db); @Override int hashCode(); boolean equals(Object other); @Override DNode<String> get(int i); @SuppressWarnings("unchecked") @Override Class<? extends DGraph<String>> level(); @Override List<DNode<String>> neighborsFast(Node<String> node); static DiskDGraph fromDB(File dbFile); static DiskDGraph fromFile(File file, File dir); static DiskDGraph fromFile(File file, File tmpDir, File dbFile); void close(); static final int NEIGHBOR_CAPACITY; }### Answer:
@Test public void testLinks() { Global.randomSeed(); DGraph<String> graph = new DiskDGraph(r()); DNode<String> a = graph.add(null), b = graph.add(null), c = graph.add(null); a.connect(b); a.connect(c); a.connect(c); assertEquals(0, a.links(a).size()); assertEquals(1, a.links(b).size()); assertEquals(1, b.links(a).size()); assertEquals(2, a.links(c).size()); assertEquals(2, c.links(a).size()); System.out.println(graph.links()); }