@Test public void testVerifyTargets_targetException() throws Exception { ManagedApplication ma = new ManagedApplication( new TestApplication()); ITargetsMngr targetsMngr = Mockito.mock( ITargetsMngr.class ); Mockito.when( targetsMngr.findTargetProperties( Mockito.any( AbstractApplication.class ), Mockito.any( String.class ))) .thenReturn( new TargetPropertiesImpl()); TargetHelpers.verifyTargets( new TargetHandlerResolverImpl(), ma, targetsMngr ); }
public static void verifyTargets( ITargetHandlerResolver targetHandlerResolver, ManagedApplication ma, ITargetsMngr targetsMngr ) { Logger logger = Logger.getLogger( TargetHelpers.class.getName()); for( Instance inst : InstanceHelpers.getAllInstances( ma.getApplication())) { if( ! InstanceHelpers.isTarget( inst )) continue; try { String path = InstanceHelpers.computeInstancePath( inst ); Map<String,String> targetProperties = targetsMngr.findTargetProperties( ma.getApplication(), path ).asMap(); targetHandlerResolver.findTargetHandler( targetProperties ); } catch( TargetException e ) { logger.warning( e.getMessage()); } } }
TargetHelpers { public static void verifyTargets( ITargetHandlerResolver targetHandlerResolver, ManagedApplication ma, ITargetsMngr targetsMngr ) { Logger logger = Logger.getLogger( TargetHelpers.class.getName()); for( Instance inst : InstanceHelpers.getAllInstances( ma.getApplication())) { if( ! InstanceHelpers.isTarget( inst )) continue; try { String path = InstanceHelpers.computeInstancePath( inst ); Map<String,String> targetProperties = targetsMngr.findTargetProperties( ma.getApplication(), path ).asMap(); targetHandlerResolver.findTargetHandler( targetProperties ); } catch( TargetException e ) { logger.warning( e.getMessage()); } } } }
TargetHelpers { public static void verifyTargets( ITargetHandlerResolver targetHandlerResolver, ManagedApplication ma, ITargetsMngr targetsMngr ) { Logger logger = Logger.getLogger( TargetHelpers.class.getName()); for( Instance inst : InstanceHelpers.getAllInstances( ma.getApplication())) { if( ! InstanceHelpers.isTarget( inst )) continue; try { String path = InstanceHelpers.computeInstancePath( inst ); Map<String,String> targetProperties = targetsMngr.findTargetProperties( ma.getApplication(), path ).asMap(); targetHandlerResolver.findTargetHandler( targetProperties ); } catch( TargetException e ) { logger.warning( e.getMessage()); } } } private  TargetHelpers(); }
TargetHelpers { public static void verifyTargets( ITargetHandlerResolver targetHandlerResolver, ManagedApplication ma, ITargetsMngr targetsMngr ) { Logger logger = Logger.getLogger( TargetHelpers.class.getName()); for( Instance inst : InstanceHelpers.getAllInstances( ma.getApplication())) { if( ! InstanceHelpers.isTarget( inst )) continue; try { String path = InstanceHelpers.computeInstancePath( inst ); Map<String,String> targetProperties = targetsMngr.findTargetProperties( ma.getApplication(), path ).asMap(); targetHandlerResolver.findTargetHandler( targetProperties ); } catch( TargetException e ) { logger.warning( e.getMessage()); } } } private  TargetHelpers(); static void verifyTargets(
			ITargetHandlerResolver targetHandlerResolver,
			ManagedApplication ma,
			ITargetsMngr targetsMngr ); static Map<String,String> expandProperties( Instance scopedInstance, Map<String,String> targetProperties ); static String findTargetHandlerName( Properties props ); static String findTargetHandlerName( Map<String,String> props ); }
TargetHelpers { public static void verifyTargets( ITargetHandlerResolver targetHandlerResolver, ManagedApplication ma, ITargetsMngr targetsMngr ) { Logger logger = Logger.getLogger( TargetHelpers.class.getName()); for( Instance inst : InstanceHelpers.getAllInstances( ma.getApplication())) { if( ! InstanceHelpers.isTarget( inst )) continue; try { String path = InstanceHelpers.computeInstancePath( inst ); Map<String,String> targetProperties = targetsMngr.findTargetProperties( ma.getApplication(), path ).asMap(); targetHandlerResolver.findTargetHandler( targetProperties ); } catch( TargetException e ) { logger.warning( e.getMessage()); } } } private  TargetHelpers(); static void verifyTargets(
			ITargetHandlerResolver targetHandlerResolver,
			ManagedApplication ma,
			ITargetsMngr targetsMngr ); static Map<String,String> expandProperties( Instance scopedInstance, Map<String,String> targetProperties ); static String findTargetHandlerName( Properties props ); static String findTargetHandlerName( Map<String,String> props );  }