METHOD_0 ( ) { org . apache . ambari . server . controller . IDENT_0 IDENT_1 = METHOD_1 ( org . apache . ambari . server . controller . IDENT_0 . class ) ; org . apache . ambari . server . controller . spi . IDENT_2 . Type type = IDENT_2 . Type . IDENT_3 ; org . apache . ambari . server . controller . IDENT_4 IDENT_5 = METHOD_1 ( org . apache . ambari . server . controller . IDENT_4 . class ) ; expect ( IDENT_5 . METHOD_2 ( ) ) . andReturn ( IDENT_6 ) ; expect ( IDENT_1 . METHOD_3 ( org . easymock . EasyMock . METHOD_4 ( ) ) ) . andReturn ( com . google . common . collect . IDENT_7 . of ( IDENT_5 ) ) ; replay ( IDENT_1 , IDENT_5 ) ; org . apache . ambari . server . controller . spi . IDENT_8 request = org . apache . ambari . server . controller . IDENT_9 . IDENT_10 . METHOD_5 ( IDENT_11 ) ; org . apache . ambari . server . controller . spi . IDENT_12 IDENT_13 = org . apache . ambari . server . controller . internal . IDENT_14 . METHOD_6 ( type , IDENT_1 ) ; java . util . Set < org . apache . ambari . server . controller . spi . IDENT_2 > resources = IDENT_13 . METHOD_7 ( request , null ) ; org . apache . ambari . server . controller . spi . IDENT_2 expected = new org . apache . ambari . server . controller . internal . METHOD_8 ( type ) ; org . apache . ambari . server . controller . internal . IDENT_15 . METHOD_9 ( expected , IDENT_11 , IDENT_6 , com . google . common . collect . IDENT_7 . of ( IDENT_11 ) ) ; "<AssertPlaceHolder>" ; verify ( IDENT_1 , IDENT_5 ) ; } of ( java . lang . IDENT_16 ) { java . util . List < org . apache . ambari . server . controller . spi . IDENT_17 > IDENT_18 = new java . util . METHOD_10 ( ) ; for ( org . apache . ambari . server . controller . spi . IDENT_17 IDENT_19 : IDENT_20 ) { if ( IDENT_19 instanceof org . apache . ambari . server . controller . IDENT_19 . IDENT_21 ) { return IDENT_19 ; } else if ( IDENT_19 instanceof org . apache . ambari . server . controller . IDENT_19 . IDENT_22 ) { IDENT_18 . addAll ( java . util . Arrays . asList ( ( ( org . apache . ambari . server . controller . IDENT_19 . IDENT_22 ) ( IDENT_19 ) ) . METHOD_11 ( ) ) ) ; } else { IDENT_18 . add ( IDENT_19 ) ; } } return ( IDENT_18 . size ( ) ) == 1 ? IDENT_18 . get ( 0 ) : new org . apache . ambari . server . controller . IDENT_19 . METHOD_12 ( IDENT_18 . toArray ( new org . apache . ambari . server . controller . spi . IDENT_17 [ IDENT_18 . size ( ) ] ) ) ; }
org . junit . Assert . assertEquals ( com . google . common . collect . IDENT_7 . of ( expected ) , resources )