void () { final Artifact artifact = addArtifact("a"); ArtifactPointer pointer = getPointerManager().createPointer(artifact); final ModifiableArtifactModel model = getArtifactManager().createModifiableModel(); assertSame(artifact, pointer.getArtifact()); final ModifiableArtifact modifiable = model.getOrCreateModifiableArtifact(artifact); assertSame(artifact, pointer.getArtifact()); assertSame(modifiable, pointer.findArtifact(model)); assertSame(artifact, pointer.getArtifact()); assertSame(pointer, getPointerManager().createPointer(artifact)); assertSame(pointer, getPointerManager().createPointer("a")); commitModel(model); assertSame(artifact, pointer.getArtifact()); Map.Entry<String, ? extends ArtifactPointer> mapping = assertOneElement(getPointerManager().getResolvedPointers()); assertEquals(artifact.getName(), mapping.getKey()); assertSame(artifact, mapping.getValue().getArtifact()); assertSame(pointer, mapping.getValue()); }