assertThat(UidField.loadVersion(reader, new Term("_uid", "1")), equalTo(-2l));
assertThat(UidField.loadDocIdAndVersion(reader, new Term("_uid", "1")).version, equalTo(-2l));
doc = new Document();
doc.add(new UidField("_uid", "1", 1));
writer.updateDocument(new Term("_uid", "1"), doc);
reader = reader.reopen();
assertThat(UidField.loadVersion(reader, new Term("_uid", "1")), equalTo(1l));
assertThat(UidField.loadDocIdAndVersion(reader, new Term("_uid", "1")).version, equalTo(1l));
doc = new Document();