### Question:
Graphs { public static <L> boolean isSimple(Graph<L> graph) { return (!hasSelfLoops(graph)) && (!hasMultiEdges(graph)); }  static UTGraph<L, T> shuffle(UTGraph<L, T> graph); static UTGraph<String, String> k(int size, String label); static DTGraph<String, String> dk(int size, String label); static UTGraph<String, String> line(int n, String label); static UTGraph<String, String> star(int n, String label); static UTGraph<String, String> ladder(int n, String label); static UTGraph<String, String> jbc(); static DTGraph<String, String> jbcDirected(); static UTGraph<String, String> single(String label); static List<Integer> degrees(Graph<?> graph); static List<Integer> inDegrees(DGraph<?> graph); static List<Integer> outDegrees(DGraph<?> graph); static void add(Graph<L> graph, Graph<L> addition); static void add(TGraph<L, T> graph, TGraph<L, T> addition); static UTGraph<String, String> reduce(UTGraph<L, T> graph); static Graph<String> blank(Graph<L> graph, String label); static UGraph<String> blank(UGraph<L> graph, String label); static DGraph<String> blank(DGraph<L> graph, String label); static UTGraph<String, String> blank(UTGraph<L, T> graph, String label); static DTGraph<String, String> blank(DTGraph<L, T> graph, String label); static Graph<L> reorder(Graph<L> graph, Order order); static UGraph<L> reorder(UGraph<L> graph, Order order); static DGraph<L> reorder(DGraph<L> graph, Order order); static UTGraph<L, T> reorder(UTGraph<L, T> graph, Order order); static DTGraph<L, T> reorder(DTGraph<L, T> graph, Order order); static String canonicalString(Graph<L> graph); static String canonicalString(DGraph<L> graph); static String canonicalString(UGraph<L> graph); static String canonicalString(DTGraph<L, T> graph); static String canonicalString(UTGraph<L, T> graph); static boolean isSimple(Graph<L> graph); static boolean hasSelfLoops(Graph<L> graph); static boolean hasMultiEdges(Graph<L> graph); static UGraph<L> toSimpleUGraph(Graph<L> data); static UGraph<L> toSimpleUGraph(Graph<L> data, FrequencyModel<Pair<Integer, Integer>> removals); static DGraph<L> toSimpleDGraph(DGraph<L> data); static DGraph<L> toSimpleDGraph(DGraph<L> data, FrequencyModel<Pair<Integer, Integer>> removals); static Collection<UGraph<String>> all(final int n, final String label); static List<UGraph<String>> allIso(int n, String label); static List<UGraph<String>> allIsoConnected(int n, String label); static boolean connected(UGraph<L> graph); static boolean connected(Graph<L> graph); static UGraph<String> fromBits(BitString bits, String label);  }### Answer:
@Test public void testSimple() { UGraph<String> graph = RandomGraphs.random(50, 75); assertTrue(Graphs.isSimple(graph)); DGraph<String> dgraph = RandomGraphs.randomDirected(50, 0.2); assertTrue(Graphs.isSimple(dgraph)); }