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