### Question:
Alignment implements Serializable { public int projectRefToQry(int refPos) { final int aliPos = Anchors.projectSeqToGapPos(refAnchors, refPos); final int qryPos = Anchors.projectGapToSeqPos(qryAnchors, aliPos); return qryPos; } 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 projectRefToQuery() { for (int i = 0; i < 10; ++i) { assertEquals(0, ungapped.projectRefToQry(0)); } assertEquals(0, overlap.projectRefToQry(0)); assertEquals(0, overlap.projectRefToQry(1)); assertEquals(0, overlap.projectRefToQry(2)); assertEquals(1, overlap.projectRefToQry(3)); assertEquals(2, overlap.projectRefToQry(4)); assertEquals(3, overlap.projectRefToQry(5)); assertEquals(4, overlap.projectRefToQry(6)); assertEquals(7, overlap.projectRefToQry(7)); assertEquals(0, refIsLonger.projectRefToQry(0)); assertEquals(0, refIsLonger.projectRefToQry(1)); assertEquals(0, refIsLonger.projectRefToQry(2)); assertEquals(1, refIsLonger.projectRefToQry(3)); assertEquals(2, refIsLonger.projectRefToQry(4)); assertEquals(3, refIsLonger.projectRefToQry(5)); assertEquals(4, refIsLonger.projectRefToQry(6)); assertEquals(5, refIsLonger.projectRefToQry(7)); assertEquals(6, refIsLonger.projectRefToQry(8)); assertEquals(6, refIsLonger.projectRefToQry(9)); assertEquals(6, refIsLonger.projectRefToQry(10)); assertEquals(2, qryIsLonger.projectRefToQry(0)); assertEquals(3, qryIsLonger.projectRefToQry(1)); assertEquals(4, qryIsLonger.projectRefToQry(2)); assertEquals(5, qryIsLonger.projectRefToQry(3)); assertEquals(6, qryIsLonger.projectRefToQry(4)); assertEquals(7, qryIsLonger.projectRefToQry(5)); assertEquals(10, qryIsLonger.projectRefToQry(6)); }