As you can see from the Travis failure, the test case is exposing a StackOverflow as well as a NullPointerException - all via legal API calls IMHO.
added test for bug #7058, and related embed problems
Thanks for writing the test. These tests have been manually merged to BiVariableMapTest in JRuby. Just clicking on merge button didn't work.
I'm going to close this pull request.