### Question:
InlineFormatAnnotation implements IMemberAnnotation { @Override public void saveAnnotations( final OlapHierarchyLevel level ) { level.setFormatter( "org.pentaho.platform.plugin.action.mondrian.formatter.InlineMemberFormatter" ); level.getAnnotations().removeIf( olapAnnotation -> INLINE_MEMBER_FORMAT_STRING.equals( olapAnnotation.getName() ) ); level.getAnnotations().add( new OlapAnnotation( INLINE_MEMBER_FORMAT_STRING, formatString ) ); } InlineFormatAnnotation( final String formatString ); @Override String getName(); @Override void saveAnnotations( final OlapHierarchyLevel level ); @Override boolean isValid( final AbstractMetaDataModelNode node ); @Override List<String> getValidationMessages( final AbstractMetaDataModelNode node ); @Override void onAttach( final AbstractMetaDataModelNode node ); @Override void onDetach( final AbstractMetaDataModelNode node ); static final String INLINE_MEMBER_FORMAT_STRING; }### Answer:
@Test public void testSavesOlapAnnotationToLevel() throws Exception { InlineFormatAnnotation memberAnnotation = new InlineFormatAnnotation( "mm-dd-yyyy" ); OlapHierarchyLevel level = new OlapHierarchyLevel(); memberAnnotation.saveAnnotations( level ); assertLevelFormatString( level, "mm-dd-yyyy" ); memberAnnotation = new InlineFormatAnnotation( "MM/DD/YYYY" ); memberAnnotation.saveAnnotations( level ); assertLevelFormatString( level, "MM/DD/YYYY" ); }