METHOD_0 ( ) { final com . mongodb . IDENT_0 IDENT_1 = new com . mongodb . METHOD_1 ( STRING_0 , new com . mongodb . METHOD_1 ( STRING_1 , new com . mongodb . METHOD_1 ( STRING_2 , 5 ) ) ) ; final com . mongodb . METHOD_1 IDENT_2 = new com . mongodb . METHOD_1 ( STRING_0 , new com . mongodb . METHOD_1 ( STRING_1 , new com . mongodb . METHOD_1 ( STRING_2 , 4 ) ) ) ; queue . METHOD_2 ( IDENT_1 ) ; queue . METHOD_2 ( IDENT_2 ) ; final com . mongodb . METHOD_1 result = queue . get ( new com . mongodb . METHOD_1 ( STRING_3 , new com . mongodb . METHOD_1 ( STRING_4 , 5 ) ) , Integer . MAX_VALUE ) ; IDENT_1 . put ( STRING_5 , result . get ( STRING_5 ) ) ; "<AssertPlaceHolder>" ; } get ( com . mongodb . METHOD_1 , int , int , long ) { java . util . IDENT_3 . METHOD_3 ( query ) ; collection . update ( new com . mongodb . METHOD_1 ( STRING_6 , true ) . append ( STRING_7 , new com . mongodb . METHOD_1 ( STRING_8 0 , new java . util . Date ( ) ) ) , new com . mongodb . METHOD_1 ( STRING_9 , new com . mongodb . METHOD_1 ( STRING_6 , false ) ) , false , true ) ; final com . mongodb . METHOD_1 IDENT_4 = new com . mongodb . METHOD_1 ( STRING_6 , false ) ; for ( final java . util . Map . Entry < java . lang . String , java . lang . Object > field : query . entrySet ( ) ) { IDENT_4 . append ( ( STRING_10 + ( field . getKey ( ) ) ) , field . getValue ( ) ) ; } IDENT_4 . append ( STRING_11 , new com . mongodb . METHOD_1 ( STRING_8 0 , new java . util . Date ( ) ) ) ; final java . util . Calendar IDENT_5 = java . util . Calendar . getInstance ( ) ; IDENT_5 . add ( Calendar . IDENT_6 , IDENT_7 ) ; final java . util . Date IDENT_8 = IDENT_5 . getTime ( ) ; final com . mongodb . METHOD_1 IDENT_9 = new com . mongodb . METHOD_1 ( STRING_12 , 1 ) . append ( STRING_8 , 1 ) ; final com . mongodb . METHOD_1 update = new com . mongodb . METHOD_1 ( STRING_9 , new com . mongodb . METHOD_1 ( STRING_6 , true ) . append ( STRING_7 , IDENT_8 ) ) ; final com . mongodb . METHOD_1 fields = new com . mongodb . METHOD_1 ( STRING_13 , 1 ) ; IDENT_5 . METHOD_4 ( java . lang . System . currentTimeMillis ( ) ) ; IDENT_5 . add ( Calendar . IDENT_10 , IDENT_11 ) ; final java . util . Date end = IDENT_5 . getTime ( ) ; while ( true ) { final com . mongodb . METHOD_1 message = ( ( com . mongodb . METHOD_1 ) ( collection . METHOD_5 ( IDENT_4 , fields , IDENT_9 , false , update , true , false ) ) ) ; if ( message != null ) { final org . bson . types . IDENT_12 id = message . METHOD_6 ( STRING_14 ) ; return ( ( com . mongodb . METHOD_1 ) ( message . get ( STRING_13 ) ) ) . append ( STRING_5 , id ) ; } if ( ( new java . util . Date ( ) . compareTo ( end ) ) >= 0 ) { return null ; } try { java . lang . Thread . sleep ( IDENT_13 ) ; } catch ( final java . lang . IDENT_14 ex ) { throw new java . lang . RuntimeException ( ex ) ; } catch ( final java . lang . IllegalArgumentException ex ) { IDENT_13 = 0 ; } } }
org . junit . Assert . assertEquals ( IDENT_1 , result )