void () { final JpsModule module = myProject.addModule("m", JpsJavaModuleType.INSTANCE); final JpsModuleReference reference = module.createReference().asExternal(myModel); assertEquals("m", reference.getModuleName()); assertSame(module, reference.resolve()); }