Diagram unit tests