MetaDataDictionary.getInstance( ).addElementDefn( elementA ); MetaDataDictionary.getInstance( ).addElementDefn( elementB );
MetadataTestUtil.addElementDefn( MetaDataDictionary.getInstance( ), elementA ); MetadataTestUtil.addElementDefn( MetaDataDictionary.getInstance( ), elementB );
	public void test_DUPLICATE_ELEMENT_NAME( )	{		// Duplication of DataSource caught.		// this.logger = createAndRegisterLogger( "metaLog17.log" );		// //$NON-NLS-1$		loadMeta( "romTest17.def" ); //$NON-NLS-1$ 		assertEquals( 2, errorList.size( ) );		assertErrorCode(				MetaDataException.DESIGN_EXCEPTION_DUPLICATE_ELEMENT_NAME, 0,				METADATA_EXCEPTION );		MetaDataDictionary.reset( );		ElementDefn elementA = new ElementDefn( );		elementA.setName( "Name" ); //$NON-NLS-1$		ElementDefn elementB = new ElementDefn( );		elementB.setName( "Name" ); //$NON-NLS-1$		try		{			MetaDataDictionary.getInstance( ).addElementDefn( elementA );			MetaDataDictionary.getInstance( ).addElementDefn( elementB );			fail( );		}		catch ( MetaDataException e )		{			assertEquals(					MetaDataException.DESIGN_EXCEPTION_DUPLICATE_ELEMENT_NAME,					e.getErrorCode( ) );			assertEquals(					"Message:Duplicate element names when adding the element [Name] to the meta-data dictionary. Error code:DUPLICATE_ELEMENT_NAME", //$NON-NLS-1$ 					e.getMessage( ).trim( ) );		}	}