@Test
public void insertField() throws Exception {

  StructDefinitionType t = new StructDefinitionType(new StructNameType("temp"),
      Arrays.asList("a", "b"),
      Arrays.asList(BasicType.FLOAT, BasicType.FLOAT));
  t.insertField(2, "c", BasicType.FLOAT);
  assertEquals(t.getNumFields(), 3);
  assertEquals("c", t.getFieldNames().get(2));
}