Port a legacy unit test