@VisibleForTesting
  void extend( int nrfields ) {
    fieldname = extend( fieldname, nrfields );
    rename = extend( rename, nrfields );
    type = extend( type, nrfields );
    length = extend( length, nrfields );
    precision = extend( precision, nrfields );
    replace = extend( replace, nrfields );
  }
@Test
  public void testExtend() {
    ScriptValuesMetaMod meta = new ScriptValuesMetaMod();
    int size = 1;
    meta.extend( size );

    Assert.assertEquals( size, meta.getFieldname().length );
    Assert.assertNull( meta.getFieldname()[ 0 ] );
    Assert.assertEquals( size, meta.getRename().length );
    Assert.assertNull( meta.getRename()[ 0 ] );
    Assert.assertEquals( size, meta.getType().length );
    Assert.assertEquals( -1, meta.getType()[ 0 ] );
    Assert.assertEquals( size, meta.getLength().length );
    Assert.assertEquals( -1, meta.getLength()[ 0 ] );
    Assert.assertEquals( size, meta.getPrecision().length );
    Assert.assertEquals( -1, meta.getPrecision()[ 0 ] );
    Assert.assertEquals( size, meta.getReplace().length );
    Assert.assertFalse( meta.getReplace()[ 0 ] );

    meta = new ScriptValuesMetaMod();
    // set some values, uneven lengths
    setInternalState( meta, "fieldname", new String[] { "Field 1", "Field 2", "Field 3" } );
    setInternalState( meta, "rename", new String[] { "Field 1 - new" } );
    setInternalState( meta, "type", new int[] { ValueMetaInterface.TYPE_STRING, ValueMetaInterface
      .TYPE_INTEGER, ValueMetaInterface.TYPE_NUMBER } );

    meta.extend( 3 );
    validateExtended( meta );
  }