@Test public void testPackageRuleFlows() throws Exception { InternalKnowledgePackage pkg = new KnowledgePackageImpl( "boo" ); Process rf = new MockRuleFlow( "1" ); pkg.addProcess( rf ); assertTrue( pkg.getRuleFlows().containsKey( "1" ) ); assertSame( rf, pkg.getRuleFlows().get( "1" ) ); Process rf2 = new MockRuleFlow( "2" ); pkg.addProcess( rf2 ); assertTrue( pkg.getRuleFlows().containsKey( "1" ) ); assertSame( rf, pkg.getRuleFlows().get( "1" ) ); assertTrue( pkg.getRuleFlows().containsKey( "2" ) ); assertSame( rf2, pkg.getRuleFlows().get( "2" ) ); pkg.removeRuleFlow( "1" ); assertTrue( pkg.getRuleFlows().containsKey( "2" ) ); assertSame( rf2, pkg.getRuleFlows().get( "2" ) ); assertFalse( pkg.getRuleFlows().containsKey( "1" ) ); }