failing test case for html without <head> on jruby

When parsing html without <head> tag on jruby, <head> tag is created and present in returned html.