### Question:
Coreness implements VertexScoringAlgorithm<V, Integer> { @Override public Integer getVertexScore(V v) { if (!g.containsVertex(v)) { throw new IllegalArgumentException("Cannot return score of unknown vertex"); } lazyRun(); return scores.get(v); } Coreness(Graph<V, E> g); @Override Map<V, Integer> getScores(); @Override Integer getVertexScore(V v); int getDegeneracy();  }### Answer:
@Test public void testNonExistantVertex() { SimpleGraph<String, DefaultEdge> g = new SimpleGraph<>(DefaultEdge.class); g.addVertex("a"); VertexScoringAlgorithm<String, Integer> pr = new Coreness<>(g); try { pr.getVertexScore("unknown"); fail("No!"); } catch (IllegalArgumentException e) { } }