private static <N, E> void validateColoring(Graph<N, E> graph) {
for (GraphNode<N, E> node : graph.getNodes()) {
assertTrue(node.getAnnotation() != null);
}
for (GraphEdge<N, E> edge : graph.getEdges()) {
Color c1 = edge.getNodeA().getAnnotation();
Color c2 = edge.getNodeB().getAnnotation();
assertTrue(c1 != null);
assertTrue(c2 != null);
assertTrue(!c1.equals(c2));
}
}