METHOD_0 ( ) { com . mongodb . IDENT_0 IDENT_1 = METHOD_1 ( ) ; com . mongodb . IDENT_2 IDENT_3 = METHOD_2 ( ) ; com . mongodb . IDENT_4 query = new com . mongodb . METHOD_3 ( STRING_0 , new org . bson . types . METHOD_4 ( STRING_1 ) ) ; com . mongodb . IDENT_4 IDENT_5 = new com . mongodb . METHOD_3 ( ) ; IDENT_5 . put ( STRING_0 , new org . bson . types . METHOD_4 ( STRING_1 ) ) ; IDENT_5 . put ( STRING_2 , STRING_3 ) ; IDENT_5 . put ( STRING_4 , true ) ; IDENT_5 . put ( STRING_5 , 0 ) ; expect ( IDENT_3 . next ( ) ) . andReturn ( IDENT_5 ) ; IDENT_3 . close ( ) ; METHOD_5 ( ) ; replay ( IDENT_3 ) ; expect ( IDENT_1 . find ( eq ( query ) ) ) . andReturn ( IDENT_3 ) ; net . IDENT_6 . IDENT_7 . model . IDENT_8 IDENT_9 = new net . IDENT_6 . IDENT_7 . model . METHOD_6 ( ) ; IDENT_9 . setId ( STRING_1 ) ; IDENT_9 . METHOD_7 ( true ) ; IDENT_9 . METHOD_8 ( STRING_3 ) ; IDENT_9 . METHOD_9 ( 0 ) ; expect ( IDENT_1 . update ( eq ( query ) , eq ( IDENT_5 ) ) ) . andReturn ( null ) ; replay ( IDENT_1 ) ; net . IDENT_6 . IDENT_7 . store . IDENT_10 store = new net . IDENT_6 . IDENT_7 . store . METHOD_10 ( IDENT_1 ) ; "<AssertPlaceHolder>" ; verify ( IDENT_3 ) ; verify ( IDENT_1 ) ; } update ( java . lang . String , net . IDENT_6 . IDENT_7 . model . METHOD_6 ) { javax . ws . rs . core . Response IDENT_11 = METHOD_11 ( id ) ; int status = IDENT_11 . getStatus ( ) ; if ( status == ( java . net . IDENT_12 . IDENT_13 ) ) { net . IDENT_6 . IDENT_7 . model . IDENT_14 IDENT_15 = IDENT_11 . METHOD_12 ( net . IDENT_6 . IDENT_7 . model . IDENT_14 . class ) ; net . IDENT_6 . IDENT_7 . model . IDENT_14 IDENT_16 = new net . IDENT_6 . IDENT_7 . model . METHOD_13 ( IDENT_17 ) ; IDENT_16 . METHOD_14 ( IDENT_15 . METHOD_15 ( ) ) ; javax . ws . rs . core . Response IDENT_18 = target . METHOD_16 ( net . IDENT_6 . IDENT_7 . store . IDENT_19 . IDENT_20 , IDENT_15 . METHOD_15 ( ) ) . path ( id ) . request ( IDENT_21 . IDENT_22 ) . put ( javax . ws . rs . client . Entity . entity ( IDENT_16 , IDENT_21 . IDENT_22 ) ) ; status = IDENT_18 . getStatus ( ) ; if ( status == ( java . net . IDENT_12 . IDENT_23 ) ) { net . IDENT_6 . IDENT_7 . model . IDENT_24 IDENT_25 = IDENT_18 . METHOD_12 ( net . IDENT_6 . IDENT_7 . model . IDENT_24 . class ) ; IDENT_17 . setId ( IDENT_25 . getId ( ) ) ; return IDENT_17 ; } else { throw new net . IDENT_6 . IDENT_7 . store . METHOD_17 ( ( STRING_6 + status ) ) ; } } else { throw new net . IDENT_6 . IDENT_7 . store . METHOD_17 ( ( STRING_7 + status ) ) ; } }
org . junit . Assert . assertEquals ( IDENT_9 , store . update ( STRING_1 , IDENT_9 ) )