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