Fixes #5049 fixed and formatted unit test