Wrap debug messages in test.