Add unit tests for debug ordering feature.

Authored by ouwerkerk on Aug 17 2019, 4:57 PM.