Adding a similar unit test from #7130.