@Test public void testProcessExceptions_noException() throws Exception { Logger logger = Logger.getLogger( getClass().getName()); List<Exception> exceptions = new ArrayList<>( 0 ); InstancesMngrImpl.processExceptions( logger, exceptions, "whatever" ); }
static void processExceptions( Logger logger, List<Exception> exceptions, String msg ) throws IOException { for( Exception e : exceptions ) Utils.logException( logger, e ); if( exceptions.size() > 0 ) { logger.info( msg ); throw new IOException( msg ); } }
InstancesMngrImpl implements IInstancesMngr { static void processExceptions( Logger logger, List<Exception> exceptions, String msg ) throws IOException { for( Exception e : exceptions ) Utils.logException( logger, e ); if( exceptions.size() > 0 ) { logger.info( msg ); throw new IOException( msg ); } } }
InstancesMngrImpl implements IInstancesMngr { static void processExceptions( Logger logger, List<Exception> exceptions, String msg ) throws IOException { for( Exception e : exceptions ) Utils.logException( logger, e ); if( exceptions.size() > 0 ) { logger.info( msg ); throw new IOException( msg ); } } InstancesMngrImpl(
			IMessagingMngr messagingMngr,
			INotificationMngr notificationMngr,
			ITargetsMngr targetsMngr,
			IRandomMngr randomMngr,
			ITargetConfigurator targetConfigurator ); }
InstancesMngrImpl implements IInstancesMngr { static void processExceptions( Logger logger, List<Exception> exceptions, String msg ) throws IOException { for( Exception e : exceptions ) Utils.logException( logger, e ); if( exceptions.size() > 0 ) { logger.info( msg ); throw new IOException( msg ); } } InstancesMngrImpl(
			IMessagingMngr messagingMngr,
			INotificationMngr notificationMngr,
			ITargetsMngr targetsMngr,
			IRandomMngr randomMngr,
			ITargetConfigurator targetConfigurator ); void setTargetHandlerResolver( ITargetHandlerResolver targetHandlerResolver ); void setRuleBasedHandler( IAutonomicMngr autonomicMngr ); void setDmDomain( String dmDomain ); @Override void addInstance( ManagedApplication ma, Instance parentInstance, Instance instance ); @Override void instanceWasUpdated( Instance instance, ManagedApplication ma ); @Override void removeInstance( ManagedApplication ma, Instance instance ); @Override void removeInstance( ManagedApplication ma, Instance instance, boolean immediate ); @Override void restoreInstanceStates( ManagedApplication ma, TargetHandler targetHandler ); @Override void resynchronizeAgents( ManagedApplication ma ); @Override void changeInstanceState( ManagedApplication ma, Instance instance, InstanceStatus newStatus ); @Override void deployAndStartAll( ManagedApplication ma, Instance instance ); @Override void stopAll( ManagedApplication ma, Instance instance ); @Override void undeployAll( ManagedApplication ma, Instance instance ); }
InstancesMngrImpl implements IInstancesMngr { static void processExceptions( Logger logger, List<Exception> exceptions, String msg ) throws IOException { for( Exception e : exceptions ) Utils.logException( logger, e ); if( exceptions.size() > 0 ) { logger.info( msg ); throw new IOException( msg ); } } InstancesMngrImpl(
			IMessagingMngr messagingMngr,
			INotificationMngr notificationMngr,
			ITargetsMngr targetsMngr,
			IRandomMngr randomMngr,
			ITargetConfigurator targetConfigurator ); void setTargetHandlerResolver( ITargetHandlerResolver targetHandlerResolver ); void setRuleBasedHandler( IAutonomicMngr autonomicMngr ); void setDmDomain( String dmDomain ); @Override void addInstance( ManagedApplication ma, Instance parentInstance, Instance instance ); @Override void instanceWasUpdated( Instance instance, ManagedApplication ma ); @Override void removeInstance( ManagedApplication ma, Instance instance ); @Override void removeInstance( ManagedApplication ma, Instance instance, boolean immediate ); @Override void restoreInstanceStates( ManagedApplication ma, TargetHandler targetHandler ); @Override void resynchronizeAgents( ManagedApplication ma ); @Override void changeInstanceState( ManagedApplication ma, Instance instance, InstanceStatus newStatus ); @Override void deployAndStartAll( ManagedApplication ma, Instance instance ); @Override void stopAll( ManagedApplication ma, Instance instance ); @Override void undeployAll( ManagedApplication ma, Instance instance );  }