### Question:
IndexQuery { public static StringContainsPredicate stringContains( int propertyKeyId, TextValue contains ) { return new StringContainsPredicate( propertyKeyId, contains ); } protected  IndexQuery( int propertyKeyId ); static ExistsPredicate exists( int propertyKeyId ); static ExactPredicate exact( int propertyKeyId, Object value ); static RangePredicate<?> range( int propertyKeyId,
                                        Number from, boolean fromInclusive,
                                        Number to, boolean toInclusive ); static RangePredicate<?> range( int propertyKeyId,
                                        String from, boolean fromInclusive,
                                        String to, boolean toInclusive ); static RangePredicate<?> range( int propertyKeyId,
                                                              VALUE from, boolean fromInclusive,
                                                              VALUE to, boolean toInclusive ); static RangePredicate<?> range( int propertyKeyId, ValueGroup valueGroup ); static RangePredicate<?> range( int propertyKeyId, CoordinateReferenceSystem crs ); static StringPrefixPredicate stringPrefix( int propertyKeyId, TextValue prefix ); static StringContainsPredicate stringContains( int propertyKeyId, TextValue contains ); static StringSuffixPredicate stringSuffix( int propertyKeyId, TextValue suffix ); static ValueTuple asValueTuple( IndexQuery.ExactPredicate... query ); abstract IndexQueryType type(); @SuppressWarnings( "EqualsWhichDoesntCheckParameterClass" ) @Override final boolean equals( Object other ); @Override final int hashCode(); @Override final String toString(); final int propertyKeyId(); abstract boolean acceptsValue( Value value ); boolean acceptsValueAt( PropertyCursor property ); abstract ValueGroup valueGroup();  }### Answer:
@Test public void testStringContains_FalseForIrrelevant() { StringContainsPredicate p = IndexQuery.stringContains( propId, stringValue( "cat" )); assertFalseForOtherThings( p ); }
@Test public void testStringContains_SomeValues() { StringContainsPredicate p = IndexQuery.stringContains( propId, stringValue( "cat" )); assertFalse( test( p, "dog" ) ); assertFalse( test( p, "cameraman" ) ); assertFalse( test( p, "Cat" ) ); assertTrue( test( p, "cat" ) ); assertTrue( test( p, "bobcat" ) ); assertTrue( test( p, "scatman" ) ); }