### Question:
BlueCasUtil { public static boolean isContained(Annotation a1, Annotation a2) { return a1.getBegin() >= a2.getBegin() && a1.getEnd() <= a2.getEnd(); }  static Collection<T> selectStrict(JCas jcas,
            Class<T> clasz, Class<?> strictClass); static boolean isEmptyText(JCas jCas); static List<Annotation> findOverlapping(JCas jcas, Annotation annotIn); static Collection<T> filterStrict(Iterable<T> raw,
            Class<?> strictClass); static int getHeaderIntDocId(JCas jCas); static String getHeaderDocId(JCas jCas); static String getHeaderSource(JCas jCas); static void fixNoSentences(JCas jCas); static void fixNoText(JCas jCas); static String getSinglePosTag(Token t); static Iterator<JCas> iterator(final CollectionReader cr); static ArrayList<JCas> asList(final CollectionReader cr); static String inspect(JCas jcas, int begin, int end); static String inspect(Annotation a); static JCas setDocId(JCas jCas, int docId); static boolean haveSameBeginEnd(Annotation a, Annotation b); static String getTitle(JCas jCas); static List<Annotation> selectCovered(CAS cas,
            AnnotationFS coveringAnnotation); static boolean keepDoc(JCas jCas); static List<T> asList(Iterable<T> select); static boolean isDocAnnot(AnnotationFS a); static int distance(Annotation a1, Annotation a2); static int maxEnd(Annotation a1, Annotation a2); static int minBegin(Annotation a1, Annotation a2); static Position isBefore(Annotation a1, Annotation a2); static boolean isContained(Annotation a1, Annotation a2); static List<String> toList(StringArray tokens);  }### Answer:
@Test public void testIsContained() throws Exception { JCas jCas = getTestCas(); Protein p1 = new Protein(jCas, 7, 10); p1.addToIndexes(); Protein p2 = new Protein(jCas, 6, 10); p2.addToIndexes(); assertTrue(isContained(p1, p2)); assertFalse(isContained(p2, p1)); Protein p3 = new Protein(jCas, 7, 10); p3.addToIndexes(); assertTrue("true if has same begin-end", isContained(p1, p3)); }