### Question:
AnnotationType implements Serializable { public void populate( final Map<String, Serializable> propertiesMap ) { if ( propertiesMap != null && propertiesMap.keySet() != null ) { Iterator<String> itr = propertiesMap.keySet().iterator(); while ( itr.hasNext() ) { String id = itr.next(); try { setModelPropertyValueById( id, propertiesMap.get( id ) ); } catch ( Exception e ) { getLogger().warning( "Unable to set value for id: " + id ); } } } }  List<String> getModelPropertyIds(); void setModelPropertyValueById( String id, Object value ); Object getModelPropertyValueById( String id ); Object getModelPropertyValueByName( String name ); Class getModelPropertyNameClassType( String name ); List<String> getModelPropertyNames(); List<ModelProperty> getModelProperties(); void setModelPropertyByName( String modelPropertyName, Object value ); Map<String, Serializable> describe(); void populate( final Map<String, Serializable> propertiesMap ); void iterateProperties( KeyValueClosure closure ); @Override boolean equals( Object obj ); @Override int hashCode(); abstract boolean apply(
      final ModelerWorkspace workspace, final IMetaStore metaStore ); abstract boolean apply( final Document schema ); abstract void validate(); abstract ModelAnnotation.Type getType(); abstract String getSummary(); abstract String getName(); abstract String getField(); boolean equalsLogically( AnnotationType obj );  }### Answer:
@Test public void testPopulate() { Map<String, Serializable> properties = new HashMap<String, Serializable>(); properties.put( null, null ); properties.put( "name", "NameTest" ); properties.put( "localizedName", 12 ); properties.put( "geoType", ModelAnnotation.GeoType.Continent ); properties.put( "hidden", "yes" ); properties.put( "timeType", "TimeDays" ); CreateAttribute createAttribute = new CreateAttribute(); createAttribute.populate( properties ); assertEquals( createAttribute.getName(), "NameTest" ); assertNotNull( createAttribute.getGeoType() ); assertEquals( createAttribute.getTimeType(), ModelAnnotation.TimeType.TimeDays ); assertEquals( createAttribute.getGeoType(), ModelAnnotation.GeoType.Continent ); properties = new HashMap<String, Serializable>(); properties.put( "aggregateType", "MAXIMUM" ); CreateMeasure createMeasure = new CreateMeasure(); createMeasure.populate( properties ); assertEquals( createMeasure.getAggregateType(), AggregationType.MAXIMUM ); }