@Test
public void testMetaData() {
final RuleModel m = new RuleModel();
final RuleMetadata rm = new RuleMetadata( "foo",
"bar" );
// test add
m.addMetadata( rm );
assertEquals( 1,
m.metadataList.length );
assertEquals( rm,
m.metadataList[0] );
// should be able to find it
RuleMetadata gm = m.getMetaData( "foo" );
assertNotNull( gm );
// test add and remove
final RuleMetadata rm2 = new RuleMetadata( "foo2",
"bar2" );
m.addMetadata( rm2 );
assertEquals( 2,
m.metadataList.length );
assertEquals( rm2,