Improvement for print and colorized valid/invalidate notification in tests.