METHOD_0 ( ) { javax . net . IDENT_0 IDENT_1 = org . mockito . Mockito . mock ( javax . net . IDENT_0 . class ) ; org . apache . hadoop . IDENT_2 . IDENT_3 server = new org . apache . hadoop . IDENT_2 . IDENT_4 . METHOD_1 ( 1 , true ) ; final java . net . IDENT_5 IDENT_6 = org . apache . hadoop . net . IDENT_7 . METHOD_2 ( server ) ; final java . util . concurrent . atomic . IDENT_8 IDENT_9 = new java . util . concurrent . atomic . METHOD_3 ( ) ; METHOD_4 ( new org . mockito . IDENT_10 . METHOD_5 ( ) { @ org . apache . hadoop . IDENT_2 . Override public java . lang . Object METHOD_6 ( org . mockito . IDENT_11 . IDENT_12 IDENT_13 ) throws java . lang . Throwable { IDENT_9 . METHOD_7 ( 1 ) ; java . lang . Thread . sleep ( ( ( org . apache . hadoop . IDENT_2 . IDENT_4 . IDENT_14 ) * 5 ) ) ; throw new org . apache . hadoop . net . METHOD_8 ( STRING_0 ) ; } } ) . when ( IDENT_1 ) . METHOD_9 ( ) ; final org . apache . hadoop . IDENT_2 . IDENT_15 client = new org . apache . hadoop . IDENT_2 . METHOD_10 ( org . apache . hadoop . io . IDENT_16 . class , org . apache . hadoop . IDENT_2 . IDENT_4 . conf , IDENT_1 ) ; final java . util . concurrent . atomic . IDENT_17 IDENT_18 = new java . util . concurrent . atomic . METHOD_11 ( false ) ; new java . lang . Thread ( new java . lang . METHOD_12 ( ) { public void run ( ) { try { IDENT_18 . set ( true ) ; org . apache . hadoop . IDENT_2 . IDENT_4 . call ( client , org . apache . hadoop . IDENT_2 . IDENT_4 . IDENT_19 . METHOD_13 ( ) , IDENT_6 , org . apache . hadoop . IDENT_2 . IDENT_4 . conf ) ; } catch ( java . io . IOException IDENT_20 ) { } } } ) . start ( ) ; org . apache . hadoop . test . IDENT_21 . METHOD_14 ( new com . google . common . base . IDENT_22 < java . lang . Boolean > ( ) { @ org . apache . hadoop . IDENT_2 . Override public org . apache . hadoop . IDENT_2 . Boolean get ( ) { return ( IDENT_18 . get ( ) ) && ( ( IDENT_9 . get ( ) ) == 1 ) ; } } , 50 , INT_0 ) ; client . METHOD_15 ( ) ; "<AssertPlaceHolder>" ; } get ( ) { return org . hadoop . IDENT_23 . IDENT_24 . IDENT_25 . IDENT_26 . IDENT_27 . db ; }
org . junit . Assert . assertEquals ( 1 , IDENT_9 . get ( ) )