Add entity tests.
Change set to the more accurate add.
Use mock exception instead of instantiated one in tests.
Entity validation called during onFlush event.