### Question:
TranscriptSequenceOntologyDecorator { public boolean liesInExon(GenomeInterval interval) { TranscriptProjectionDecorator projector = new TranscriptProjectionDecorator(transcript); final int exonNo = projector.locateExon(interval.getGenomeBeginPos()); if (exonNo == TranscriptProjectionDecorator.INVALID_EXON_ID) return false; return transcript.getExonRegions().get(exonNo).contains(interval); } TranscriptSequenceOntologyDecorator(TranscriptModel transcript); TranscriptModel getTranscript(); GenomeInterval getStartCodonInterval(); GenomeInterval getStopCodonInterval(); GenomeInterval getFivePrimeUTRInterval(); ImmutableList<GenomeInterval> getFivePrimeUTRExonIntervals(); boolean overlapsWithFivePrimeUTRExon(GenomeInterval itv); GenomeInterval getThreePrimeUTRInterval(); ImmutableList<GenomeInterval> getThreePrimeUTRExonIntervals(); boolean overlapsWithThreePrimeUTRExon(GenomeInterval itv); boolean containsExon(GenomeInterval interval); boolean overlapsWithCDSExon(GenomeInterval interval); boolean liesInCDSExon(GenomeInterval interval); boolean liesInCDSExon(GenomePosition pos); boolean overlapsWithCDS(GenomeInterval interval); boolean liesInCDS(GenomePosition pos); boolean overlapsWithIntron(GenomeInterval changeInterval); boolean liesInIntron(GenomePosition pos); boolean overlapsWithCDSIntron(GenomeInterval changeInterval); boolean liesInCDSIntron(GenomePosition pos); boolean overlapsWithTranslationalStartSite(GenomeInterval interval); boolean liesInTranslationalStartSite(GenomePosition pos); boolean overlapsWithTranslationalStopSite(GenomeInterval interval); boolean liesInTranslationalStopSite(GenomePosition pos); boolean overlapsWithSpliceRegion(GenomeInterval interval); boolean liesInSpliceRegion(GenomePosition pos); boolean overlapsWithSpliceDonorSite(GenomeInterval interval); boolean liesInSpliceDonorSite(GenomePosition pos); boolean overlapsWithSpliceAcceptorSite(GenomeInterval interval); boolean liesInSpliceAcceptorSite(GenomePosition pos); GenomeInterval getUpstreamInterval(); boolean overlapsWithUpstreamRegion(GenomeInterval interval); boolean liesInUpstreamRegion(GenomePosition pos); GenomeInterval getDownstreamInterval(); boolean overlapsWithDownstreamRegion(GenomeInterval interval); boolean liesInDownstreamRegion(GenomePosition pos); boolean overlapsWithFivePrimeUTR(GenomeInterval interval); boolean liesInFivePrimeUTR(GenomePosition pos); boolean overlapsWithThreePrimeUTR(GenomeInterval interval); boolean liesInThreePrimeUTR(GenomePosition pos); boolean liesInIntron(GenomeInterval interval); boolean liesInExon(GenomeInterval interval); boolean liesInExon(GenomePosition pos); boolean overlapsWithExon(GenomeInterval interval); static int UPSTREAM_LENGTH; static int DOWNSTREAM_LENGTH; }### Answer:
@Test public void testLiesInExonForwardSuccess() { TranscriptSequenceOntologyDecorator decorator = new TranscriptSequenceOntologyDecorator(infoForward); Assert.assertTrue(decorator.liesInExon(new GenomeInterval(refDict, Strand.FWD, 1, 6640669, 6640672, PositionType.ZERO_BASED))); Assert.assertTrue(decorator.liesInExon(new GenomeInterval(refDict, Strand.FWD, 1, 6646754, 6646757, PositionType.ZERO_BASED))); }
@Test public void testLiesInExonForwardFailure() { TranscriptSequenceOntologyDecorator decorator = new TranscriptSequenceOntologyDecorator(infoForward); Assert.assertFalse(decorator.liesInExon(new GenomeInterval(refDict, Strand.FWD, 1, 6640195, 6640198, PositionType.ZERO_BASED))); }