Fix deprecation warnings -- replace mock with double