### Question:
UpdateMeasure extends AnnotationType { @Override public void validate() throws ModelerException { if ( StringUtils.isBlank( measure ) ) { throw new ModelerException( BaseMessages.getString( MSG_CLASS, "ModelAnnotation.UpdateMeasure.validation.MEASURE_NAME_REQUIRED" ) ); } }  @Override boolean apply(
      final ModelerWorkspace workspace, final IMetaStore metaStore ); @Override boolean apply( final Document schema ); @Override void validate(); @Override ModelAnnotation.Type getType(); @Override String getSummary(); @Override String getName(); void setName( String name ); String getMeasure(); void setMeasure( String measure ); String getCube(); void setCube( String cube ); @Override String getField(); AggregationType getAggregationType(); void setAggregationType( AggregationType aggregationType ); String getFormat(); void setFormat( String format ); String getCaption(); void setCaption( final String caption );  }### Answer:
@Test public void testValidate() { UpdateMeasure updateMeasure = new UpdateMeasure(); updateMeasure.setMeasure( INIT_MEASURE_FORMULA ); updateMeasure.setName( NEW_BUYPRICE_NAME ); try { updateMeasure.validate(); } catch ( Exception e ) { fail( "Should be valid be was not" ); } updateMeasure.setMeasure( "" ); try { updateMeasure.validate(); fail( "Exception should of been thrown" ); } catch ( Exception e ) { } }