METHOD_0 ( ) { final com . allanbank . mongodb . IDENT_0 config = new com . allanbank . mongodb . METHOD_1 ( ) ; final com . allanbank . mongodb . client . state . IDENT_1 cluster = new com . allanbank . mongodb . client . state . METHOD_2 ( config , com . allanbank . mongodb . client . IDENT_2 . IDENT_3 ) ; final com . allanbank . mongodb . client . state . IDENT_4 server = cluster . add ( STRING_0 ) ; final com . allanbank . mongodb . client . state . IDENT_4 IDENT_5 = cluster . add ( STRING_1 ) ; final com . allanbank . mongodb . client . connection . IDENT_6 IDENT_7 = METHOD_3 ( com . allanbank . mongodb . client . connection . IDENT_6 . class ) ; final com . allanbank . mongodb . client . connection . IDENT_6 IDENT_8 = METHOD_3 ( com . allanbank . mongodb . client . connection . IDENT_6 . class ) ; final com . allanbank . mongodb . client . state . IDENT_9 IDENT_10 = METHOD_3 ( com . allanbank . mongodb . client . state . IDENT_9 . class ) ; final com . allanbank . mongodb . client . connection . proxy . IDENT_11 IDENT_12 = METHOD_3 ( com . allanbank . mongodb . client . connection . proxy . IDENT_11 . class ) ; final org . easymock . IDENT_13 < java . beans . IDENT_14 > listener = new org . easymock . IDENT_13 < java . beans . IDENT_14 > ( ) ; final org . easymock . IDENT_13 < java . beans . IDENT_14 > IDENT_15 = new org . easymock . IDENT_13 < java . beans . IDENT_14 > ( ) ; IDENT_7 . METHOD_4 ( METHOD_5 ( listener ) ) ; METHOD_6 ( ) ; expect ( IDENT_12 . connect ( IDENT_5 , config ) ) . andReturn ( IDENT_8 ) ; IDENT_8 . METHOD_4 ( METHOD_5 ( IDENT_15 ) ) ; METHOD_6 ( ) ; replay ( IDENT_7 , IDENT_8 , IDENT_10 , IDENT_12 ) ; final com . allanbank . mongodb . client . connection . IDENT_16 . IDENT_17 conn = new com . allanbank . mongodb . client . connection . IDENT_16 . METHOD_7 ( IDENT_7 , server , cluster , IDENT_10 , IDENT_12 , config ) ; "<AssertPlaceHolder>" ; verify ( IDENT_7 , IDENT_8 , IDENT_10 , IDENT_12 ) ; METHOD_8 ( IDENT_7 , IDENT_8 , IDENT_10 , IDENT_12 ) ; IDENT_7 . METHOD_9 ( listener . getValue ( ) ) ; METHOD_6 ( ) ; IDENT_8 . METHOD_9 ( IDENT_15 . getValue ( ) ) ; METHOD_6 ( ) ; IDENT_7 . close ( ) ; METHOD_6 ( ) ; IDENT_8 . close ( ) ; METHOD_6 ( ) ; replay ( IDENT_7 , IDENT_8 , IDENT_10 , IDENT_12 ) ; conn . close ( ) ; verify ( IDENT_7 , IDENT_8 , IDENT_10 , IDENT_12 ) ; } connect ( com . allanbank . mongodb . client . state . IDENT_4 ) { com . allanbank . mongodb . client . connection . IDENT_6 conn = null ; try { conn = IDENT_18 . connect ( server , IDENT_19 ) ; conn = METHOD_10 ( server , conn ) ; } catch ( final java . io . IOException e ) { com . allanbank . mongodb . client . connection . IDENT_16 . METHOD_7 . LOG . info ( e , STRING_2 , server . METHOD_11 ( ) , e . getMessage ( ) ) ; } return conn ; }
org . junit . Assert . assertThat ( conn . connect ( IDENT_5 ) , org . hamcrest . Matchers . is ( IDENT_8 ) )