### Question:
SchemaCache { public CapableIndexDescriptor indexDescriptor( SchemaDescriptor descriptor ) { return schemaCacheState.indexDescriptor( descriptor ); } SchemaCache( ConstraintSemantics constraintSemantics, Iterable<SchemaRule> initialRules, IndexProviderMap indexProviderMap ); private  SchemaCache( SchemaCacheState schemaCacheState ); Iterable<CapableIndexDescriptor> indexDescriptors(); Iterable<ConstraintRule> constraintRules(); boolean hasConstraintRule( Long constraintRuleId ); boolean hasConstraintRule( ConstraintDescriptor descriptor ); boolean hasIndex( SchemaDescriptor descriptor ); Iterator<ConstraintDescriptor> constraints(); Iterator<ConstraintDescriptor> constraintsForLabel( final int label ); Iterator<ConstraintDescriptor> constraintsForRelationshipType( final int relTypeId ); Iterator<ConstraintDescriptor> constraintsForSchema( SchemaDescriptor descriptor ); T getOrCreateDependantState( Class<T> type, Function<P,T> factory, P parameter ); void load( Iterable<SchemaRule> rules ); void addSchemaRule( SchemaRule rule ); void removeSchemaRule( long id ); CapableIndexDescriptor indexDescriptor( SchemaDescriptor descriptor ); Iterator<CapableIndexDescriptor> indexDescriptorsForLabel( int labelId ); Iterator<CapableIndexDescriptor> indexDescriptorsForRelationshipType( int relationshipType ); Iterator<CapableIndexDescriptor> indexesByProperty( int propertyId ); CapableIndexDescriptor indexDescriptorForName( String name ); SchemaCache snapshot();  }### Answer:
@Test public void shouldReturnNullWhenNoIndexExists() { SchemaCache schemaCache = newSchemaCache(); IndexDescriptor schemaIndexDescriptor = schemaCache.indexDescriptor( forLabel( 1, 1 ) ); assertNull( schemaIndexDescriptor ); }