(maint) Convert acceptance test for #7117 to unit test