### Question:
IndexQuery { public static ExistsPredicate exists( int propertyKeyId ) { return new ExistsPredicate( propertyKeyId ); } 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 testExists() { ExistsPredicate p = IndexQuery.exists( propId ); assertTrue( test( p, "string" ) ); assertTrue( test( p, 1 ) ); assertTrue( test( p, 1.0 ) ); assertTrue( test( p, true ) ); assertTrue( test( p, new long[]{1L} ) ); assertTrue( test( p, Values.pointValue( CoordinateReferenceSystem.WGS84, 12.3, 45.6 ) ) ); assertFalse( test( p, null ) ); }