Refactoring DiagramTest