Add test code for visualization.