fix test_mock for jruby