SimpleSequencePair extends SimpleProfile<S, C> implements SequencePair<S, C> { @Override public int getIndexInTargetForQueryAt(int queryIndex) { return getAlignedSequence(2).getSequenceIndexAt(getAlignedSequence(1).getAlignmentIndexAt(queryIndex)); } SimpleSequencePair(AlignedSequence<S, C> query, AlignedSequence<S, C> target);  SimpleSequencePair(S query, S target, List<Step> sx, List<Step> sy);  SimpleSequencePair(S query, S target, List<Step> sx, int xb, int xa, List<Step> sy, int yb, int ya); @Override C getCompoundInQueryAt(int alignmentIndex); @Override C getCompoundInTargetAt(int alignmentIndex); @Override int getIndexInQueryAt(int alignmentIndex); @Override int getIndexInQueryForTargetAt(int targetIndex); @Override int getIndexInTargetAt(int alignmentIndex); @Override int getIndexInTargetForQueryAt(int queryIndex); @Override int getNumIdenticals(); @Override int getNumSimilars(); @Override AlignedSequence<S, C> getQuery(); @Override AlignedSequence<S, C> getTarget();  }
@Test public void testGetIndexInTargetForQueryAt() { assertEquals(global.getIndexInTargetForQueryAt(1), 1); assertEquals(global.getIndexInTargetForQueryAt(2), 1); assertEquals(global.getIndexInTargetForQueryAt(3), 1); assertEquals(global.getIndexInTargetForQueryAt(4), 2); assertEquals(local.getIndexInTargetForQueryAt(1), 1); assertEquals(local.getIndexInTargetForQueryAt(2), 1); assertEquals(local.getIndexInTargetForQueryAt(3), 1); assertEquals(local.getIndexInTargetForQueryAt(4), 2); }
@Test(expected=IndexOutOfBoundsException.class) public void testGetIndexInTargetForQueryAtOutOfBounds() { global.getIndexInTargetForQueryAt(0); }
@Test(expected=IndexOutOfBoundsException.class) public void testGetIndexInTargetForQueryAtOutOfBounds2() { global.getIndexInTargetForQueryAt(5); }
@Test(expected=IndexOutOfBoundsException.class) public void testGetIndexInTargetForQueryAtOutOfBounds3() { local.getIndexInTargetForQueryAt(0); }
@Test(expected=IndexOutOfBoundsException.class) public void testGetIndexInTargetForQueryAtOutOfBounds4() { local.getIndexInTargetForQueryAt(5); }