In one of the project I work on, I use graphviz for visualization and have test code for this functionality.