ParameterPushdownModel extends AbstractModel { public void setFieldList( ImmutableList<String> fieldList ) { this.fieldList = fieldList; for ( DefinitionAdapter definitionAdapter : definitions ) { definitionAdapter.setFieldList( fieldList ); } firePropertyChange( "definitions", null, definitions ); } ParameterPushdownModel( ParameterPushdown parameterPushdown ); ParameterPushdownModel reset(); ParameterPushdown getDelegate(); ImmutableList<DefinitionAdapter> getDefinitions(); void setFieldList( ImmutableList<String> fieldList ); @Override Map<String, Object> snapshot();  }
@Test public void testSetFieldList() throws Exception { model.reset(); model.setFieldList( ImmutableList.of( "field1", "field2", "field3" ) ); Vector<String> fieldList = model.getDefinitions().get( 0 ).getFieldList(); assertThat( fieldList.get( 0 ), equalTo( "" ) ); assertThat( fieldList.get( 1 ), equalTo( "field1" ) ); assertThat( fieldList.get( 2 ), equalTo( "field2" ) ); assertThat( fieldList.get( 3 ), equalTo( "field3" ) ); }