METHOD_0 ( ) { when ( IDENT_0 . METHOD_1 ( com . cloud . storage . IDENT_1 . IDENT_2 . IDENT_3 ) ) . thenReturn ( true ) ; when ( IDENT_4 . METHOD_2 ( ) ) . thenReturn ( IDENT_5 . IDENT_6 . IDENT_7 ) ; when ( IDENT_4 . METHOD_3 ( ) ) . thenReturn ( INT_0 ) ; when ( IDENT_4 . METHOD_4 ( ) ) . thenReturn ( INT_0 ) ; final boolean result = IDENT_8 . METHOD_1 ( com . cloud . storage . IDENT_1 . IDENT_2 . IDENT_3 ) ; "<AssertPlaceHolder>" ; } METHOD_1 ( java . lang . Long ) { final com . cloud . storage . IDENT_9 IDENT_10 = IDENT_11 . METHOD_5 ( IDENT_12 ) ; if ( ( IDENT_10 . METHOD_2 ( ) ) == ( com . cloud . IDENT_13 . storage . IDENT_14 . IDENT_6 . IDENT_15 ) ) { IDENT_11 . remove ( IDENT_12 ) ; return true ; } if ( ( IDENT_10 . METHOD_2 ( ) ) == ( com . cloud . IDENT_13 . storage . IDENT_14 . IDENT_6 . IDENT_7 ) ) { return true ; } if ( IDENT_5 . IDENT_6 . IDENT_16 . equals ( IDENT_10 . METHOD_2 ( ) ) ) { final java . util . List < com . cloud . storage . datastore . db . IDENT_17 > IDENT_18 = IDENT_19 . METHOD_6 ( IDENT_12 ) ; for ( final com . cloud . storage . datastore . db . IDENT_17 ref : IDENT_18 ) { IDENT_19 . METHOD_7 ( ref . getId ( ) ) ; } IDENT_11 . remove ( IDENT_12 ) ; return true ; } if ( ( IDENT_10 . METHOD_2 ( ) ) == ( com . cloud . IDENT_13 . storage . IDENT_14 . IDENT_6 . IDENT_20 ) ) { com . cloud . storage . IDENT_1 . IDENT_21 . IDENT_22 . debug ( STRING_0 ) ; IDENT_10 . METHOD_8 ( IDENT_5 . IDENT_6 . IDENT_7 ) ; IDENT_11 . update ( IDENT_12 , IDENT_10 ) ; return true ; } if ( ( ! ( IDENT_5 . IDENT_6 . IDENT_23 . equals ( IDENT_10 . METHOD_2 ( ) ) ) ) && ( ! ( IDENT_5 . IDENT_6 . IDENT_16 . equals ( IDENT_10 . METHOD_2 ( ) ) ) ) ) { throw new com . cloud . IDENT_13 . exceptions . METHOD_9 ( ( ( ( ( STRING_1 + IDENT_12 ) + STRING_2 ) + ( IDENT_10 . METHOD_2 ( ) ) ) + STRING_3 ) ) ; } final com . cloud . engine . IDENT_24 . api . storage . IDENT_25 IDENT_26 = IDENT_27 . METHOD_10 ( IDENT_12 , IDENT_28 . IDENT_29 ) ; if ( IDENT_26 == null ) { com . cloud . storage . IDENT_1 . IDENT_21 . IDENT_22 . debug ( STRING_4 ) ; IDENT_11 . remove ( IDENT_12 ) ; return true ; } final com . cloud . storage . IDENT_1 . IDENT_30 obj = ( ( com . cloud . storage . IDENT_1 . IDENT_30 ) ( IDENT_26 ) ) ; try { obj . METHOD_11 ( IDENT_5 . IDENT_31 . IDENT_32 ) ; } catch ( final com . cloud . IDENT_13 . exceptions . IDENT_33 e ) { com . cloud . storage . IDENT_1 . IDENT_21 . IDENT_22 . debug ( STRING_5 , e ) ; return false ; } try { final boolean result = METHOD_12 ( IDENT_26 ) ; obj . METHOD_11 ( IDENT_5 . IDENT_31 . IDENT_34 ) ; if ( result ) { final com . cloud . storage . datastore . db . IDENT_17 IDENT_35 = IDENT_19 . METHOD_13 ( IDENT_12 , IDENT_28 . IDENT_36 ) ; if ( IDENT_35 != null ) { IDENT_35 . METHOD_8 ( IDENT_6 . IDENT_7 ) ; IDENT_19 . update ( IDENT_35 . getId ( ) , IDENT_35 ) ; } } } catch ( final java . lang . Exception e ) { com . cloud . storage . IDENT_1 . IDENT_21 . IDENT_22 . debug ( STRING_6 , e ) ; try { obj . METHOD_11 ( IDENT_5 . IDENT_31 . IDENT_37 ) ; } catch ( final com . cloud . IDENT_13 . exceptions . IDENT_33 IDENT_38 ) { com . cloud . storage . IDENT_1 . IDENT_21 . IDENT_22 . debug ( ( STRING_7 + ( e . toString ( ) ) ) ) ; } return false ; } return true ; }
org . junit . Assert . assertTrue ( result )