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 . connection . proxy . IDENT_8 IDENT_9 = METHOD_3 ( com . allanbank . mongodb . client . connection . proxy . IDENT_8 . class ) ; final com . allanbank . mongodb . client . state . IDENT_10 IDENT_11 = METHOD_3 ( com . allanbank . mongodb . client . state . IDENT_10 . class ) ; expect ( IDENT_6 . METHOD_4 ( ) ) . andReturn ( server ) ; expect ( IDENT_9 . connect ( server , config ) ) . METHOD_5 ( new java . io . IOException ( STRING_1 ) ) ; expect ( IDENT_11 . METHOD_6 ( ) ) . andReturn ( java . util . Collections . singletonList ( server ) ) ; expect ( IDENT_9 . connect ( server , config ) ) . andReturn ( IDENT_7 ) ; IDENT_7 . METHOD_7 ( METHOD_8 ( com . allanbank . mongodb . client . message . IDENT_12 . class ) , cb ( com . allanbank . mongodb . bson . builder . IDENT_13 . start ( com . allanbank . mongodb . client . state . IDENT_14 . IDENT_15 ) ) ) ; METHOD_9 ( ) ; replay ( IDENT_6 , IDENT_7 , IDENT_9 , IDENT_11 ) ; final com . allanbank . mongodb . client . state . IDENT_16 strategy = new com . allanbank . mongodb . client . state . METHOD_10 ( ) ; strategy . METHOD_11 ( IDENT_9 ) ; strategy . METHOD_12 ( config ) ; strategy . METHOD_13 ( IDENT_11 ) ; strategy . METHOD_14 ( cluster ) ; "<AssertPlaceHolder>" ; verify ( IDENT_6 , IDENT_7 , IDENT_9 , IDENT_11 ) ; } METHOD_15 ( com . allanbank . mongodb . client . connection . IDENT_5 ) { final boolean IDENT_17 = java . lang . Thread . METHOD_16 ( ) ; try { final com . allanbank . mongodb . client . state . IDENT_4 IDENT_18 = IDENT_19 . METHOD_4 ( ) ; com . allanbank . mongodb . client . connection . IDENT_5 IDENT_20 = METHOD_17 ( IDENT_18 ) ; if ( IDENT_20 != null ) { return IDENT_20 ; } final java . util . List < com . allanbank . mongodb . client . state . IDENT_4 > IDENT_21 = METHOD_18 ( ) . METHOD_6 ( ) ; for ( final com . allanbank . mongodb . client . state . IDENT_4 server : IDENT_21 ) { IDENT_20 = METHOD_17 ( server ) ; if ( IDENT_20 != null ) { return IDENT_20 ; } } com . allanbank . mongodb . client . state . METHOD_10 . LOG . info ( STRING_2 , IDENT_21 . size ( ) , IDENT_21 ) ; } finally { if ( IDENT_17 ) { java . lang . Thread . METHOD_19 ( ) . METHOD_20 ( ) ; } } return null ; }
org . junit . Assert . assertSame ( IDENT_7 , strategy . METHOD_15 ( IDENT_6 ) )