### Question:
AnnotationType implements Serializable { public void iterateProperties( KeyValueClosure closure ) { Map<String, Serializable> properties = describe(); if ( closure == null || properties == null || properties.keySet() == null ) { return; } Iterator<String> itr = properties.keySet().iterator(); while ( itr.hasNext() ) { String key = itr.next(); if ( StringUtils.isNotBlank( key ) ) { Serializable value = properties.get( key ); if ( value != null ) { closure.execute( key, value ); } } } }  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 testIterateProperties() { 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( "timeFormat", null ); CreateAttribute createAttribute = new CreateAttribute(); createAttribute.populate( properties ); final List<String> keyList = new ArrayList<String>(); final List<Serializable> valueList = new ArrayList<Serializable>(); createAttribute.iterateProperties( new KeyValueClosure() { @Override public void execute( String key, Serializable serializable ) { keyList.add( key ); valueList.add( serializable ); } } ); assertEquals( 4, keyList.size() ); assertEquals( 4, valueList.size() ); }