METHOD_0 ( ) { METHOD_1 ( "foo" , "bar" ) ; java . util . Set < io . IDENT_0 . elasticsearch . plugin . model . IDENT_1 > IDENT_2 = service . METHOD_2 ( STRING_0 ) ; java . util . Set < io . IDENT_0 . elasticsearch . plugin . model . IDENT_1 > exp = new java . util . HashSet < io . IDENT_0 . elasticsearch . plugin . model . IDENT_1 > ( ) ; exp . add ( new io . IDENT_0 . elasticsearch . plugin . model . METHOD_3 ( "foo" , "foo" ) ) ; exp . add ( new io . IDENT_0 . elasticsearch . plugin . model . METHOD_3 ( "bar" , "bar" ) ) ; "<AssertPlaceHolder>" ; } METHOD_2 ( java . lang . String ) { try ( io . IDENT_0 . IDENT_3 . client . IDENT_4 client = factory . METHOD_4 ( token ) ) { IDENT_5 . IDENT_6 request = new IDENT_5 . IDENT_6 . Builder ( ) . url ( ( ( client . METHOD_5 ( ) ) + STRING_1 ) ) . header ( io . IDENT_0 . elasticsearch . plugin . IDENT_7 . IDENT_8 , io . IDENT_0 . elasticsearch . plugin . IDENT_7 . IDENT_9 ) . build ( ) ; IDENT_5 . Response response = client . METHOD_6 ( ) . METHOD_7 ( request ) . execute ( ) ; if ( ( response . code ( ) ) != ( IDENT_10 . IDENT_11 . getStatus ( ) ) ) { throw new org . elasticsearch . METHOD_8 ( STRING_2 , org . elasticsearch . rest . IDENT_10 . METHOD_9 ( response . code ( ) ) ) ; } java . util . Set < io . IDENT_0 . elasticsearch . plugin . model . METHOD_3 > IDENT_2 = new java . util . HashSet ( ) ; java . util . List < java . util . Map < java . lang . String , java . lang . String > > IDENT_12 = com . IDENT_13 . IDENT_14 . IDENT_15 . read ( response . body ( ) . METHOD_10 ( ) , STRING_3 ) ; for ( java . util . Map < java . lang . String , java . lang . String > map : IDENT_12 ) { IDENT_2 . add ( new io . IDENT_0 . elasticsearch . plugin . model . METHOD_3 ( map . get ( "name" ) , map . get ( STRING_4 ) ) ) ; } return IDENT_2 ; } catch ( io . IDENT_0 . IDENT_16 . client . IDENT_17 e ) { io . IDENT_0 . elasticsearch . plugin . IDENT_7 . LOGGER . error ( STRING_5 , e ) ; throw new org . elasticsearch . METHOD_8 ( e . getMessage ( ) ) ; } catch ( java . io . IOException e ) { io . IDENT_0 . elasticsearch . plugin . IDENT_7 . LOGGER . error ( STRING_5 , e ) ; throw new org . elasticsearch . METHOD_11 ( e ) ; } }
org . junit . Assert . assertEquals ( exp , IDENT_2 )