Patch for test

This patches improve tests.
These are not necessary soon but would be needed when we bump core to later versions.
Agree, so create `TestUtils` class in root package then move this only as initial.