Test code for the non-DAG detection.