### Question:
ModelAnnotation implements Serializable { public org.pentaho.agilebi.modeler.models.annotations.ModelAnnotation.Type getType() { if ( annotation != null ) { return annotation.getType(); } return null; } ModelAnnotation(); @Deprecated // Legacy Support  ModelAnnotation( final String field, final T annotation );  ModelAnnotation( final T annotation ); String getName(); void setName( String name ); static List<ModelAnnotation<CreateMeasure>> getMeasures(
      final List<ModelAnnotation<? extends org.pentaho.agilebi.modeler.models.annotations.AnnotationType>> annotations ); static List<ModelAnnotation<CreateAttribute>> getAttributes(
      final List<ModelAnnotation<? extends org.pentaho.agilebi.modeler.models.annotations.AnnotationType>> annotations ); @Deprecated // Legacy Support String getField(); @Deprecated // Legacy Support void setField( String field ); @Deprecated // Legacy Support String getCube(); @Deprecated // Legacy Support void setCube( String cube ); T getAnnotation(); void setAnnotation( T annotation ); boolean apply( final ModelerWorkspace modelerWorkspace, final IMetaStore metaStore ); boolean apply( final Document schema ); org.pentaho.agilebi.modeler.models.annotations.ModelAnnotation.Type getType(); Map<String, Serializable> describeAnnotation(); void populateAnnotation( final Map<String, Serializable> properties ); void iterateProperties( final KeyValueClosure closure ); @Override boolean equals( Object obj ); @Override int hashCode();  }### Answer:
@Test public void testMeasure() { CreateMeasure createMeasure = new CreateMeasure(); List<ModelAnnotation<?>> list = new ArrayList<ModelAnnotation<?>>(); list.add( new ModelAnnotation<CreateMeasure>( createMeasure ) ); ModelAnnotation<?> md = list.get( 0 ); assertEquals( md.getType(), ModelAnnotation.Type.CREATE_MEASURE ); assertEquals( md.getType().description(), "Create Measure" ); }
@Test public void testAttribute() { CreateAttribute createAttribute = new CreateAttribute(); List<ModelAnnotation<?>> list = new ArrayList<ModelAnnotation<?>>(); list.add( new ModelAnnotation<CreateAttribute>( createAttribute ) ); ModelAnnotation<?> md = list.get( 0 ); assertEquals( md.getType(), ModelAnnotation.Type.CREATE_ATTRIBUTE ); assertEquals( md.getType().description(), "Create Attribute" ); }