void () { DomainObjectSet<? extends IdeaModule> ideaModules = allModels.getModel(IdeaProject.class).getModules(); List<ScalaModel> scalaModels = ContainerUtil.mapNotNull(ideaModules, module -> allModels.getModel(module, ScalaModel.class)); assertEquals(1, scalaModels.size()); ScalaModel scalaModel = scalaModels.get(0); ScalaCompileOptions scalaCompileOptions = scalaModel.getScalaCompileOptions(); assertNotNull(scalaCompileOptions); assertEquals(1, scalaCompileOptions.getAdditionalParameters().size()); assertEquals("-opt:opt", scalaCompileOptions.getAdditionalParameters().iterator().next()); }