Fix failing jruby test

`klass.to_s` sometimes fails in jruby, if the klass is defined in java world

So I suggest to use `Class#name` in this test