@Test
public void testFindTargetHandler() throws Exception {

	TargetHandler th1 = Mockito.mock( TargetHandler.class );
	Mockito.when( th1.getTargetId()).thenReturn( "t1" );
	TargetHandler th2 = Mockito.mock( TargetHandler.class );
	Mockito.when( th2.getTargetId()).thenReturn( "t2" );
	TargetHandlerResolverImpl mngr = new TargetHandlerResolverImpl();
	mngr.addTargetHandler( th1 );
	mngr.addTargetHandler( th2 );
	Map<String,String> targetProperties = new HashMap<>();
	targetProperties.put( Constants.TARGET_PROPERTY_HANDLER, "t2" );
	Assert.assertEquals( th2, mngr.findTargetHandler( targetProperties ));
	targetProperties.put( Constants.TARGET_PROPERTY_HANDLER, "t1" );
	Assert.assertEquals( th1, mngr.findTargetHandler( targetProperties ));
}