LogicGraph { @NonNull public Set<LogicNode> initialNodes() { return initials; } LogicGraph(@NonNull Set<LogicNode> initials, @NonNull Map<String, LogicNode> idToNode, @NonNull Map<LogicNode, Set<LogicNode>> edge); @NonNull static LogicGraph createFromScriptList(@NonNull Collection<ScriptStructure> scripts); @NonNull Set<LogicNode> initialNodes(); @Nullable LogicNode getNode(@NonNull String id); @Nullable Set<LogicNode> successors(@NonNull LogicNode node); @NonNull Set<LogicNode> successorsM(@NonNull LogicNode node);  }
@Test public void testInitials() throws Exception { Set<LogicGraph.LogicNode> initials = new HashSet<>(); initials.add(node1); assertTrue(graph.initialNodes().containsAll(initials)); assertTrue(initials.containsAll(graph.initialNodes())); }