fontHandle = dataSource.getHandle( design ).getFontProperty( );
fontHandle = ApiTestUtil.getFontProperty( dataSource );
	public void testParse( ) throws SemanticException	{		StyleElement myStyle = design.findStyle( "My Style" ); //$NON-NLS-1$		assertNotNull( myStyle );		fontHandle = myStyle.getHandle( design ).getFontProperty( );		//  tests with the font name as CSS-compatible string.		assertEquals( DesignChoiceConstants.FONT_FAMILY_CURSIVE, fontHandle				.getStringValue( ) ); //$NON-NLS-1$		// tests with the font as a display string.		ThreadResources.setLocale( TEST_LOCALE ); //$NON-NLS-1$ 		assertEquals( "\u8fde\u4f53", fontHandle.getDisplayValue( ) ); //$NON-NLS-1$		assertEquals( DesignChoiceConstants.FONT_FAMILY_CURSIVE, fontHandle				.getStringValue( ) );		ThreadResources.setLocale( ULocale.ENGLISH );		assertEquals( "Cursive", fontHandle //$NON-NLS-1$				.getDisplayValue( ) );		//  tests with the font entry at a given position, should be null.		Style style1 = (Style) design.findStyle( "Style1" ); //$NON-NLS-1$		assertNotNull( style1 );		fontHandle = style1.getHandle( design ).getFontProperty( );		//  tests with the font entry at a given position.		assertEquals( "Time New Roman, Arial", fontHandle.getStringValue( ) ); //$NON-NLS-1$		String[] names = fontHandle.getFontFamilies( );		assertEquals( "Time New Roman", names[0] ); //$NON-NLS-1$		assertEquals( "Arial", names[1] ); //$NON-NLS-1$		// tests sets/gets CSS constant names.		fontHandle.setValue( DesignChoiceConstants.FONT_FAMILY_SANS_SERIF );		assertEquals( DesignChoiceConstants.FONT_FAMILY_SANS_SERIF, fontHandle				.getStringValue( ) );		// read a font handle from a structure like highlight.		StyleHandle style1Handle = style1.handle( design );		Iterator highlightHandles = style1Handle.highlightRulesIterator( );		assertNotNull( highlightHandles );		HighlightRuleHandle highlightHandle = (HighlightRuleHandle) highlightHandles				.next( );		assertNotNull( highlightHandle );		// no font family has been defined for style1, the value should be null.		FontHandle fontHandle = highlightHandle.getFontFamilyHandle( );		assertNotNull( fontHandle );		assertNull( fontHandle.getStringValue( ) ); //$NON-NLS-1$		assertNull( fontHandle.getFontFamilies( ) ); //$NON-NLS-1$		Style style2 = (Style) design.findStyle( "Style2" ); //$NON-NLS-1$		assertNotNull( style2 );		// font handle with a default value.		fontHandle = null;		fontHandle = style2.getHandle( design ).getFontProperty( );		assertNotNull( fontHandle );		//  tests with the font entry at a given position.		names = fontHandle.getFontFamilies( );		assertEquals( 1, names.length );		assertEquals( "serif", names[0] ); //$NON-NLS-1$		//  tests with the font weight.		StyleHandle style2Handle = style2.handle( design );		assertNotNull( style2Handle );		assertEquals( DesignChoiceConstants.FONT_WEIGHT_LIGHTER, style2Handle				.getFontWeight( ) );		style2Handle.setFontWeight( DesignChoiceConstants.FONT_WEIGHT_100 );		assertEquals( DesignChoiceConstants.FONT_WEIGHT_100, style2Handle				.getFontWeight( ) );		try		{			style2Handle.setFontWeight( "450" ); //$NON-NLS-1$			fail( );		}		catch ( PropertyValueException e )		{			assertEquals( e.getErrorCode( ), PropertyValueException.DESIGN_EXCEPTION_CHOICE_NOT_FOUND );		}		// read a font handle from a structure like highlight.		highlightHandles = style2Handle.highlightRulesIterator( );		assertNotNull( highlightHandles );		highlightHandle = (HighlightRuleHandle) highlightHandles.next( );		assertNotNull( highlightHandle );		fontHandle = highlightHandle.getFontFamilyHandle( );		assertEquals( "Arial", fontHandle.getStringValue( ) ); //$NON-NLS-1$		assertEquals( "Arial", fontHandle.getDisplayValue( ) ); //$NON-NLS-1$		// no second highlight rule, must be null.		highlightHandle = (HighlightRuleHandle) highlightHandles.next( );		assertNull( highlightHandle );		// finds a design element that do not support font family property.		OdaDataSource dataSource = (OdaDataSource) design				.findDataSource( "myDataSource" ); //$NON-NLS-1$		assertNotNull( dataSource );		// font handle must be null.		fontHandle = dataSource.getHandle( design ).getFontProperty( );		assertNull( fontHandle );	}