METHOD_0 ( ) { java . lang . Class < org . eclipse . IDENT_0 . camel . internal . utils . IDENT_1 > clazz = org . eclipse . IDENT_0 . camel . internal . utils . IDENT_1 . class ; org . apache . camel . spi . IDENT_2 IDENT_3 = mock ( org . apache . camel . spi . IDENT_2 . class ) ; java . util . Set < org . eclipse . IDENT_0 . camel . internal . utils . IDENT_1 > set = new java . util . HashSet < org . eclipse . IDENT_0 . camel . internal . utils . IDENT_1 > ( ) ; set . add ( null ) ; when ( IDENT_3 . METHOD_1 ( clazz ) ) . thenReturn ( set ) ; org . eclipse . IDENT_0 . camel . internal . utils . IDENT_1 service = org . eclipse . IDENT_0 . camel . internal . utils . IDENT_4 . METHOD_2 ( clazz , IDENT_3 ) ; "<AssertPlaceHolder>" ; } METHOD_2 ( java . lang . Class , org . apache . camel . spi . IDENT_2 ) { if ( registry == null ) { throw new java . lang . IllegalArgumentException ( STRING_0 ) ; } java . util . Set < T > IDENT_5 = registry . METHOD_1 ( clazz ) ; if ( ( IDENT_5 . size ( ) ) == 1 ) { T service = IDENT_5 . iterator ( ) . next ( ) ; org . eclipse . IDENT_0 . camel . internal . utils . IDENT_4 . logger . info ( ( ( STRING_1 + ( clazz . METHOD_3 ( ) ) ) + STRING_2 ) ) ; return service ; } else if ( ( IDENT_5 . size ( ) ) > 1 ) { throw new java . lang . IllegalStateException ( ( ( ( STRING_3 + ( clazz . METHOD_3 ( ) ) ) + STRING_4 ) + ( IDENT_5 . size ( ) ) ) ) ; } else { throw new java . lang . IllegalArgumentException ( ( ( STRING_5 + ( clazz . METHOD_3 ( ) ) ) + STRING_6 ) ) ; } }
org . junit . Assert . assertNull ( service )