[TASK] Adapt unit tests

Extend non deprecated UnitTestCase
tests controller->addFlashMessage

Resolves: #28769
Releases: 6.2

Change-Id: Ib9d095bf32afbca014fc9dd97a33d25d18ff9c7d
Reviewed-on: https://review.typo3.org/29224
Reviewed-by: Nico de Haen
Tested-by: Nico de Haen