Add tests for the changes in #2690