### Question:
CompositeAdjacencyList implements AdjacencyList { @Override public int degree(long nodeId) { long degree = 0L; for (int i = 0; i < adjacencyLists.size(); i++) { long offset = adjacencyOffsets.get(i).get(nodeId); if (offset != 0) { degree += adjacencyLists.get(i).degree(offset); } } return Math.toIntExact(degree); } CompositeAdjacencyList(List<AdjacencyList> adjacencyLists, List<AdjacencyOffsets> adjacencyOffsets); @Override int degree(long nodeId); @Override PropertyCursor cursor(long offset); @Override CompositeAdjacencyCursor rawDecompressingCursor(); @Override CompositeAdjacencyCursor decompressingCursor(long nodeId); @Override void close();  }### Answer:
@Test void shouldComputeCorrectDegree() { var adjacencyList = ((CSRGraph) graph).relationshipTopology().list(); assertTrue(adjacencyList instanceof CompositeAdjacencyList); assertEquals(2, adjacencyList.degree(0)); assertEquals(0, adjacencyList.degree(1)); }