There are a number of problems with the tests in TestPersistenceService:
The tests do two things, test that the persistence works, and verify that the diagrams are drawn as expected. This should be split up.
The part that verifies the diagram is not that useful. It just tests the bounds of all diagram elements. If something goes wrong, we don't really know what except that the pixels are off. We should test for specific expectations about the absolute and/or relative positions and dimensions of objects.
The part that verifies the diagram is sensitive to the OS that the test runs on, because different system fonts lead to slightly different dimensions. See #346 and #400. It's a huge pain to have to adapt the tests for all OSes. The same oracle should be valid independently of the OS.
There are a number of problems with the tests in
TestPersistenceService
: