### Question:
Alignment implements Serializable { public int projectQryToRef(int qryPos) { final int aliPos = Anchors.projectSeqToGapPos(qryAnchors, qryPos); final int refPos = Anchors.projectGapToSeqPos(refAnchors, aliPos); return refPos; } Alignment(List<Anchor> refAnchors, List<Anchor> qryAnchors); static Alignment createUngappedAlignment(int length); ImmutableList<Anchor> getRefAnchors(); ImmutableList<Anchor> getQryAnchors(); int refLeadingGapLength(); int refTrailingGapLength(); int qryLeadingGapLength(); int qryTrailingGapLength(); int projectRefToQry(int refPos); int projectQryToRef(int qryPos); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test public void projectQueryToRef() { for (int i = 0; i < 10; ++i) { assertEquals(0, ungapped.projectQryToRef(0)); } assertEquals(2, overlap.projectQryToRef(0)); assertEquals(3, overlap.projectQryToRef(1)); assertEquals(5, overlap.projectQryToRef(2)); assertEquals(5, overlap.projectQryToRef(3)); assertEquals(6, overlap.projectQryToRef(4)); assertEquals(7, overlap.projectQryToRef(5)); assertEquals(7, overlap.projectQryToRef(6)); assertEquals(7, overlap.projectQryToRef(7)); assertEquals(2, refIsLonger.projectQryToRef(0)); assertEquals(3, refIsLonger.projectQryToRef(1)); assertEquals(4, refIsLonger.projectQryToRef(2)); assertEquals(5, refIsLonger.projectQryToRef(3)); assertEquals(6, refIsLonger.projectQryToRef(4)); assertEquals(7, refIsLonger.projectQryToRef(5)); assertEquals(10, refIsLonger.projectQryToRef(6)); assertEquals(0, qryIsLonger.projectQryToRef(0)); assertEquals(0, qryIsLonger.projectQryToRef(1)); assertEquals(0, qryIsLonger.projectQryToRef(2)); assertEquals(1, qryIsLonger.projectQryToRef(3)); assertEquals(2, qryIsLonger.projectQryToRef(4)); assertEquals(3, qryIsLonger.projectQryToRef(5)); assertEquals(4, qryIsLonger.projectQryToRef(6)); assertEquals(5, qryIsLonger.projectQryToRef(7)); assertEquals(6, qryIsLonger.projectQryToRef(8)); assertEquals(6, qryIsLonger.projectQryToRef(9)); assertEquals(6, qryIsLonger.projectQryToRef(10)); }