METHOD_0 ( ) { final com . cloud . IDENT_0 . network . IDENT_1 network = mock ( com . cloud . IDENT_0 . network . IDENT_1 . class ) ; when ( network . METHOD_1 ( ) ) . thenReturn ( IDENT_2 . IDENT_3 ) ; when ( network . getId ( ) ) . thenReturn ( com . cloud . network . element . IDENT_4 . IDENT_5 ) ; when ( network . METHOD_2 ( ) ) . thenReturn ( com . cloud . network . element . IDENT_4 . IDENT_5 ) ; final com . cloud . IDENT_6 . IDENT_7 IDENT_6 = mock ( com . cloud . IDENT_6 . IDENT_7 . class ) ; when ( IDENT_6 . getId ( ) ) . thenReturn ( com . cloud . network . element . IDENT_4 . IDENT_5 ) ; when ( IDENT_6 . METHOD_3 ( ) ) . thenReturn ( IDENT_8 . IDENT_9 ) ; when ( IDENT_6 . METHOD_4 ( ) ) . thenReturn ( IDENT_10 . IDENT_11 ) ; final java . util . List < com . cloud . network . IDENT_12 > IDENT_13 = new java . util . ArrayList ( ) ; final com . cloud . network . IDENT_12 IDENT_14 = mock ( com . cloud . network . IDENT_12 . class ) ; final com . cloud . network . IDENT_12 IDENT_15 = mock ( com . cloud . network . IDENT_12 . class ) ; final com . cloud . IDENT_0 . network . IDENT_16 IDENT_17 = new com . cloud . IDENT_0 . network . METHOD_5 ( com . cloud . utils . net . IDENT_18 . METHOD_6 ( STRING_0 ) ) ; final com . cloud . IDENT_0 . network . METHOD_5 IDENT_19 = new com . cloud . IDENT_0 . network . METHOD_5 ( com . cloud . utils . net . IDENT_18 . METHOD_6 ( STRING_1 ) ) ; when ( IDENT_15 . METHOD_7 ( ) ) . thenReturn ( IDENT_20 . IDENT_21 . IDENT_22 ) ; when ( IDENT_15 . METHOD_8 ( ) ) . thenReturn ( IDENT_19 ) ; when ( IDENT_15 . METHOD_9 ( ) ) . thenReturn ( STRING_2 ) ; when ( IDENT_14 . METHOD_7 ( ) ) . thenReturn ( IDENT_20 . IDENT_21 . IDENT_23 ) ; when ( IDENT_14 . METHOD_8 ( ) ) . thenReturn ( IDENT_17 ) ; when ( IDENT_14 . METHOD_9 ( ) ) . thenReturn ( STRING_2 ) ; IDENT_13 . add ( IDENT_15 ) ; IDENT_13 . add ( IDENT_14 ) ; final java . util . Set < com . cloud . IDENT_0 . network . IDENT_1 . IDENT_24 > services = new java . util . HashSet ( ) ; services . add ( IDENT_24 . IDENT_25 ) ; services . add ( IDENT_24 . IDENT_26 ) ; services . add ( IDENT_24 . IDENT_27 ) ; final java . util . List < com . cloud . network . IDENT_28 > IDENT_29 = new java . util . ArrayList ( ) ; final com . cloud . network . IDENT_28 IDENT_30 = mock ( com . cloud . network . IDENT_28 . class ) ; final com . cloud . network . IDENT_31 IDENT_32 = mock ( com . cloud . network . IDENT_31 . class ) ; when ( IDENT_33 . METHOD_10 ( com . cloud . network . element . IDENT_4 . IDENT_5 ) ) . thenReturn ( IDENT_32 ) ; when ( IDENT_32 . METHOD_11 ( ) ) . thenReturn ( STRING_3 ) ; when ( IDENT_30 . METHOD_12 ( ) ) . thenReturn ( com . cloud . network . element . IDENT_4 . IDENT_5 ) ; final com . cloud . host . IDENT_34 IDENT_35 = mock ( com . cloud . host . IDENT_34 . class ) ; when ( IDENT_35 . getId ( ) ) . thenReturn ( com . cloud . network . element . IDENT_4 . IDENT_5 ) ; when ( IDENT_35 . METHOD_13 ( STRING_4 ) ) . thenReturn ( STRING_3 ) ; when ( IDENT_36 . METHOD_14 ( com . cloud . network . element . IDENT_4 . IDENT_5 ) ) . thenReturn ( IDENT_35 ) ; IDENT_29 . add ( IDENT_30 ) ; when ( IDENT_37 . METHOD_15 ( com . cloud . network . element . IDENT_4 . IDENT_5 ) ) . thenReturn ( IDENT_29 ) ; final com . cloud . IDENT_0 . IDENT_38 . IDENT_39 . IDENT_40 IDENT_39 = mock ( com . cloud . IDENT_0 . IDENT_38 . IDENT_39 . IDENT_40 . class ) ; when ( IDENT_39 . METHOD_16 ( ) ) . thenReturn ( true ) ; when ( IDENT_41 . METHOD_17 ( eq ( com . cloud . network . element . IDENT_4 . IDENT_5 ) , any ( com . cloud . IDENT_0 . IDENT_38 . command . IDENT_42 . class ) ) ) . thenReturn ( IDENT_39 ) ; "<AssertPlaceHolder>" ; verify ( IDENT_41 , METHOD_18 ( 1 ) ) . METHOD_17 ( eq ( com . cloud . network . element . IDENT_4 . IDENT_5 ) , METHOD_19 ( new org . mockito . IDENT_43 < com . cloud . IDENT_0 . IDENT_38 . command . IDENT_42 > ( ) { @ com . cloud . network . element . Override public boolean matches ( final java . lang . Object IDENT_44 ) { final com . cloud . IDENT_0 . IDENT_38 . command . IDENT_42 command = ( ( com . cloud . IDENT_0 . IDENT_38 . command . IDENT_42 ) ( IDENT_44 ) ) ; if ( ( command . METHOD_20 ( ) . size ( ) ) == 1 ) { return true ; } return false ; } } ) ) ; } METHOD_21 ( com . cloud . IDENT_0 . network . IDENT_1 , java . util . List , java . util . Set ) { boolean IDENT_45 = true ; for ( final com . cloud . IDENT_0 . network . IDENT_1 . IDENT_24 service : services ) { if ( ! ( METHOD_22 ( network , service ) ) ) { METHOD_22 = false ; break ; } } boolean result = true ; if ( METHOD_22 ) { final java . util . List < com . cloud . IDENT_46 . IDENT_47 > IDENT_48 = IDENT_49 . METHOD_23 ( network . getId ( ) , IDENT_50 . IDENT_51 ) ; if ( ( IDENT_48 == null ) || ( IDENT_48 . isEmpty ( ) ) ) { com . cloud . network . element . IDENT_52 . IDENT_53 . debug ( ( ( ( getName ( ) ) + STRING_5 ) + ( network . getId ( ) ) ) ) ; return false ; } final com . cloud . db . model . IDENT_54 IDENT_55 = IDENT_56 . METHOD_14 ( network . METHOD_24 ( ) ) . METHOD_25 ( null ) ; final com . cloud . network . IDENT_57 . IDENT_58 IDENT_59 = IDENT_60 . METHOD_26 ( IDENT_55 ) ; for ( final com . cloud . IDENT_46 . IDENT_47 IDENT_61 : IDENT_48 ) { result = result && ( IDENT_59 . METHOD_27 ( network , IDENT_62 , IDENT_61 ) ) ; } } return result ; }
org . junit . Assert . assertTrue ( element . METHOD_21 ( network , IDENT_13 , services ) )