Diagnostic utility functions ============================ TEST