Fix unit tests for #2272