adapt specs to JRuby