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 . connection . IDENT_5 IDENT_6 = METHOD_3 ( com . allanbank . mongodb . client . connection . IDENT_5 . class ) ; final com . allanbank . mongodb . client . connection . IDENT_5 IDENT_7 = METHOD_3 ( com . allanbank . mongodb . client . connection . IDENT_5 . class ) ; final com . allanbank . mongodb . client . state . IDENT_8 IDENT_9 = METHOD_3 ( com . allanbank . mongodb . client . state . IDENT_8 . class ) ; final com . allanbank . mongodb . client . connection . proxy . IDENT_10 IDENT_11 = METHOD_3 ( com . allanbank . mongodb . client . connection . proxy . IDENT_10 . class ) ; final org . easymock . IDENT_12 < java . beans . IDENT_13 > listener = new org . easymock . IDENT_12 < java . beans . IDENT_13 > ( ) ; IDENT_6 . METHOD_4 ( METHOD_5 ( listener ) ) ; METHOD_6 ( ) ; expect ( IDENT_11 . connect ( server , config ) ) . andReturn ( IDENT_7 ) ; IDENT_7 . METHOD_7 ( true ) ; METHOD_6 ( ) ; replay ( IDENT_6 , IDENT_7 , IDENT_9 , IDENT_11 ) ; final com . allanbank . mongodb . client . connection . IDENT_14 . IDENT_15 conn = new com . allanbank . mongodb . client . connection . IDENT_14 . METHOD_8 ( IDENT_6 , server , cluster , IDENT_9 , IDENT_11 , config ) ; "<AssertPlaceHolder>" ; verify ( IDENT_6 , IDENT_7 , IDENT_9 , IDENT_11 ) ; METHOD_9 ( IDENT_6 , IDENT_7 , IDENT_9 , IDENT_11 ) ; IDENT_6 . METHOD_10 ( listener . getValue ( ) ) ; METHOD_6 ( ) ; IDENT_6 . close ( ) ; replay ( IDENT_6 , IDENT_7 , IDENT_9 , IDENT_11 ) ; conn . close ( ) ; verify ( IDENT_6 , IDENT_7 , IDENT_9 , IDENT_11 ) ; } connect ( com . allanbank . mongodb . client . state . IDENT_4 ) { com . allanbank . mongodb . client . connection . IDENT_5 conn = null ; try { conn = IDENT_16 . connect ( server , IDENT_17 ) ; conn = METHOD_11 ( server , conn ) ; } catch ( final java . io . IOException e ) { com . allanbank . mongodb . client . connection . IDENT_14 . METHOD_8 . LOG . info ( e , STRING_1 , server . METHOD_12 ( ) , e . getMessage ( ) ) ; } return conn ; }
org . junit . Assert . assertThat ( conn . connect ( server ) , org . hamcrest . Matchers . is ( IDENT_6 ) )