AutonomicMngrImpl implements IAutonomicMngr { @Override public void refreshApplicationRules( Application app, String ruleFileName ) { AutonomicApplicationContext ctx = this.appNameToContext.get( app.getName()); if( ctx != null ) loadRule( app, ctx, ruleFileName ); } AutonomicMngrImpl( ICommandsMngr commandsMngr ); void setPreferencesMngr( IPreferencesMngr preferencesMngr ); @Override void loadApplicationRules( Application app ); @Override void refreshApplicationRules( Application app, String ruleFileName ); @Override void unloadApplicationRules( Application app ); @Override void notifyVmWasDeletedByHand( Instance rootInstance ); @Override int getAutonomicInstancesCount(); @Override void handleEvent( ManagedApplication ma, MsgNotifAutonomic event );  }
@Test public void testRefreshRules_unknownApp() throws Exception { TestApplication app = new TestApplication(); Assert.assertEquals( 0, this.autonomicMngr.appNameToContext.size()); this.autonomicMngr.refreshApplicationRules( app, null ); Assert.assertEquals( 0, this.autonomicMngr.appNameToContext.size()); }