@Test(expected = IndexOutOfBoundsException.class)
public void insertField2() throws Exception {

  StructDefinitionType t = new StructDefinitionType(new StructNameType("temp"),
      Arrays.asList("a", "b"),
      Arrays.asList(BasicType.FLOAT, BasicType.FLOAT));
  t.insertField(4, "d", BasicType.FLOAT);
}