public void allocate( int nrfields ) {
    fieldName = new String[nrfields];
  }
@Test
  public void testAllocate() {
    CheckSumMeta checkSumMeta = new CheckSumMeta();
    Random random = new Random();
    int maxAllocation = 50;

    // Initially the array should exist but be empty
    String[] fieldNames = checkSumMeta.getFieldName();
    assertNotNull( fieldNames );
    assertEquals( 0, fieldNames.length );

    // Some random numbers
    for ( int i = 0; i < 10; ++i ) {
      int n = random.nextInt( maxAllocation );
      checkSumMeta.allocate( n );
      fieldNames = checkSumMeta.getFieldName();
      assertNotNull( fieldNames );
      assertEquals( n, fieldNames.length );
    }

    // Zero
    checkSumMeta.allocate( 0 );
    fieldNames = checkSumMeta.getFieldName();
    assertNotNull( fieldNames );
    assertEquals( 0, fieldNames.length );
  }