Useful utility for debugging. I think it should be in the repository.
Basic test.