Fixed tests for JRuby