JavaEngineTest: fix failing tests

When constructing a JavaScriptLanguage, it needs a context. The
ScriptLanguages are actually singletons per context, so we can simply
create the context and then ask for the associated singleton from the
object service.