METHOD_0 ( ) { java . util . concurrent . IDENT_0 IDENT_1 = java . util . concurrent . IDENT_2 . METHOD_1 ( 10 ) ; try { io . IDENT_3 . future . IDENT_4 < java . lang . Integer > p = io . IDENT_3 . future . IDENT_4 . apply ( ) ; java . util . concurrent . atomic . IDENT_5 expected = new java . util . concurrent . atomic . METHOD_2 ( ( - 1 ) ) ; java . util . concurrent . atomic . IDENT_6 start = new java . util . concurrent . atomic . METHOD_3 ( ) ; for ( int i = 0 ; i < 10 ; i ++ ) { final int IDENT_7 = i ; IDENT_1 . METHOD_4 ( ( ) -> { while ( true ) { if ( start . get ( ) ) break ; } if ( p . METHOD_5 ( io . IDENT_3 . future . IDENT_8 . value ( IDENT_7 ) ) ) expected . set ( IDENT_7 ) ; } ) ; } start . set ( true ) ; int result = p . get ( java . time . IDENT_9 . METHOD_6 ( 100 ) ) ; java . lang . Thread . sleep ( 100 ) ; "<AssertPlaceHolder>" ; } finally { IDENT_1 . METHOD_7 ( ) ; } } get ( ) { final java . util . Optional < ? > [ ] ctx = io . IDENT_3 . future . IDENT_10 . IDENT_11 . get ( ) ; if ( ( ctx == null ) || ( ( ctx . length ) <= ( position ) ) ) return java . util . Optional . empty ( ) ; final java . util . Optional < ? > v = ctx [ position ] ; if ( v == null ) return java . util . Optional . empty ( ) ; else return ( ( java . util . Optional < T > ) ( v ) ) ; }
org . junit . Assert . assertEquals ( expected . get ( ) , result )