### Question:
LuceneIndex implements Index<T> { public IndexHits<T> get( String key, Object value ) { return query( type.get( key, value ), key, value, null ); } LuceneIndex( LuceneIndexImplementation service, IndexIdentifier identifier ); String getName(); void add( T entity, String key, Object value ); void remove( T entity, String key, Object value ); void remove( T entity, String key ); void remove( T entity ); void delete(); IndexHits<T> get( String key, Object value ); IndexHits<T> query( String key, Object queryOrQueryObject ); IndexHits<T> query( Object queryOrQueryObject ); void setCacheCapacity( String key, int capacity ); Integer getCacheCapacity( String key );  }### Answer:
@Test public void makeSureConfigurationCanBeModified() { Index<Node> index = nodeIndex( "conf-index", LuceneIndexImplementation.EXACT_CONFIG ); try { graphDb.index().setConfiguration( index, "provider", "something" ); fail( "Shouldn't be able to modify provider" ); } catch ( IllegalArgumentException e ) { } try { graphDb.index().removeConfiguration( index, "provider" ); fail( "Shouldn't be able to modify provider" ); } catch ( IllegalArgumentException e ) { } String key = "my-key"; String value = "my-value"; String newValue = "my-new-value"; assertNull( graphDb.index().setConfiguration( index, key, value ) ); assertEquals( value, graphDb.index().getConfiguration( index ).get( key ) ); assertEquals( value, graphDb.index().setConfiguration( index, key, newValue ) ); assertEquals( newValue, graphDb.index().getConfiguration( index ).get( key ) ); assertEquals( newValue, graphDb.index().removeConfiguration( index, key ) ); assertNull( graphDb.index().getConfiguration( index ).get( key ) ); }