deduplicate the same in the tests