Replace deprecated `stub` with `double`