Make tests pass on jruby
Merge pull request #440 from strzalek/jruby-tests

Make tests pass on jruby