void () { JpsLibraryReference reference = JpsElementFactory.getInstance().createLibraryReference("l", myProject.createReference()).asExternal(myModel); assertEquals("l", reference.getLibraryName()); assertNull(reference.resolve()); final JpsLibrary library = myProject.addLibrary("l", JpsJavaLibraryType.INSTANCE); assertSame(library, reference.resolve()); }