@Override
  public void setValueMeta( int index, ValueMetaInterface valueMeta ) {
    if ( valueMeta != null ) {
      lock.writeLock().lock();
      try {
        ValueMetaInterface old = valueMetaList.get( index );
        ValueMetaInterface newMeta = valueMeta;

        // try to check if a ValueMeta with the same name already exists
        int existsIndex = indexOfValue( valueMeta.getName() );
        // if it exists and it's not in the requested position
        // we need to take care of renaming
        if ( existsIndex >= 0 && existsIndex != index ) {
          newMeta = renameValueMetaIfInRow( valueMeta, null );
        }
        valueMetaList.set( index, newMeta );
        cache.replaceMapping( old.getName(), newMeta.getName(), index );
        needRealClone = null;
      } finally {
        lock.writeLock().unlock();
      }
    }
  }
@Test
  public void testSetValueMeta() {
    rowMeta.setValueMeta( 1, charly );
    assertEquals( 1, rowMeta.getValueMetaList().indexOf( charly ) );
    assertEquals( "There is still 3 elements:", 3, rowMeta.size() );
    assertEquals( -1, rowMeta.indexOfValue( "integer" ) );
  }