added tests to testDiagram