Fix unit tests for #1152