### Question:
DynamicRecordListFieldImpl extends AbstractField { @Override public int getListSize() { throw new UnsupportedOperationException( "Field represents a variable-length list; use DynamicRecordList to obtain the size of this list"); } DynamicRecordListFieldImpl(final String name, final Structure structure); @Override long getDataLength(); @Override String getDeclaration(); @Override int getListSize(); @Override String getName(); @Override Structure getStructure(); @Override DataType getType();  }### Answer:
@Test(expected = UnsupportedOperationException.class) public void testGetListSize() { field.getListSize(); }