[BUGFIX] Fix getter assertions in template for domain model tests

Change-Id: I9e006d19f88c0595565267160719b02901075389
Resolves: #54712
Reviewed-on: https://review.typo3.org/26621
Reviewed-by: Steffen Müller
Tested-by: Steffen Müller