unit test refactor for #3052 and #3053