Buggy code:
@ RunWith ( Arquillian . class ) @ RunAsClient public class JSFFailoverTestCase extends ClusterAbstractTestCase { @ Deployment ( name = DEPLOYMENT_1 , managed = false , testable = false ) @ TargetsContainer ( CONTAINER_1 ) public static Archive < ? > deployment0 ( ) { } @ Deployment ( name = DEPLOYMENT_2 , managed = false , testable = false ) @ TargetsContainer ( CONTAINER_2 ) public static Archive < ? > deployment1 ( ) { } private static Archive < ? > createDeployment ( ) { } @ Override protected void setUp ( ) { } private static JSFFailoverTestCase . NumberGuessState parseState ( HttpResponse response , String sessionId ) throws IOException , IllegalStateException { } private static HttpUriRequest buildPostRequest ( String url , String sessionId , String viewState , String guess ) throws UnsupportedEncodingException { } private static HttpUriRequest buildGetRequest ( String url , String sessionId ) { } @ Test @ InSequence ( 1 ) public void testGracefulSimpleFailover ( @ ArquillianResource @ OperateOnDeployment ( DEPLOYMENT_1 ) URL baseURL1 , @ ArquillianResource @ OperateOnDeployment ( DEPLOYMENT_2 ) URL baseURL2 ) throws IOException , InterruptedException , URISyntaxException { DefaultHttpClient client = HttpClientUtils . relaxedCookieHttpClient ( ) ; String url1 = ( baseURL1 . toString ( ) ) + "home.jsf" ; String url2 = ( baseURL2 . toString ( ) ) + "home.jsf" ; <START_BUG> System . out . println ( ( ( ( "URLs<seq2seq4repair_space>are:<seq2seq4repair_space>" + url1 ) + ",<seq2seq4repair_space>" ) + url2 ) ) ; <END_BUG> try { HttpResponse response ; JSFFailoverTestCase . NumberGuessState state ; response = client . execute ( JSFFailoverTestCase . buildGetRequest ( url1 , null ) ) ; try { Assert . assertEquals ( SC_OK , response . getStatusLine ( ) . getStatusCode ( ) ) ; state = JSFFailoverTestCase . parseState ( response , null ) ; } finally { org . apache . http . client . utils . HttpClientUtils . closeQuietly ( response ) ; } String sessionId = state . sessionId ; Assert . assertNotNull ( sessionId ) ; Assert . assertEquals ( "0" , state . smallest ) ; Assert . assertEquals ( "100" , state . biggest ) ; Assert . assertEquals ( "10" , state . remainingGuesses ) ; response = client . execute ( JSFFailoverTestCase . buildPostRequest ( url1 , state . sessionId , state . jsfViewState , "1" ) ) ; try { Assert . assertEquals ( SC_OK , response . getStatusLine ( ) . getStatusCode ( ) ) ; state = JSFFailoverTestCase . parseState ( response , sessionId ) ; } finally { org . apache . http . client . utils . HttpClientUtils . closeQuietly ( response ) ; } Assert . assertEquals ( "2" , state . smallest ) ; Assert . assertEquals ( "100" , state . biggest ) ; Assert . assertEquals ( "9" , state . remainingGuesses ) ; stop ( CONTAINER_1 ) ; this . establishView ( client , baseURL2 , NODE_2 ) ; response = client . execute ( JSFFailoverTestCase . buildPostRequest ( url2 , state . sessionId , state . jsfViewState , "100" ) ) ; try { Assert . assertEquals ( SC_OK , response . getStatusLine ( ) . getStatusCode ( ) ) ; state = JSFFailoverTestCase . parseState ( response , sessionId ) ; } finally { org . apache . http . client . utils . HttpClientUtils . closeQuietly ( response ) ; } Assert . assertEquals ( "Session<seq2seq4repair_space>failed<seq2seq4repair_space>to<seq2seq4repair_space>replicate<seq2seq4repair_space>after<seq2seq4repair_space>container<seq2seq4repair_space>1<seq2seq4repair_space>was<seq2seq4repair_space>shutdown." , "8" , state . remainingGuesses ) ; Assert . assertEquals ( sessionId , state . sessionId ) ; Assert . assertEquals ( "2" , state . smallest ) ; Assert . assertEquals ( "99" , state . biggest ) ; response = client . execute ( JSFFailoverTestCase . buildPostRequest ( url2 , sessionId , state . jsfViewState , "99" ) ) ; try { Assert . assertEquals ( SC_OK , response . getStatusLine ( ) . getStatusCode ( ) ) ; state = JSFFailoverTestCase . parseState ( response , sessionId ) ; } finally { org . apache . http . client . utils . HttpClientUtils . closeQuietly ( response ) ; } Assert . assertEquals ( "7" , state . remainingGuesses ) ; Assert . assertEquals ( "2" , state . smallest ) ; Assert . assertEquals ( "98" , state . biggest ) ; start ( CONTAINER_1 ) ; this . establishView ( client , baseURL2 , NODE_1 , NODE_2 ) ; response = client . execute ( JSFFailoverTestCase . buildPostRequest ( url1 , state . sessionId , state . jsfViewState , "2" ) ) ; try { Assert . assertEquals ( SC_OK , response . getStatusLine ( ) . getStatusCode ( ) ) ; state = JSFFailoverTestCase . parseState ( response , sessionId ) ; } finally { org . apache . http . client . utils . HttpClientUtils . closeQuietly ( response ) ; } Assert . assertEquals ( "Session<seq2seq4repair_space>failed<seq2seq4repair_space>to<seq2seq4repair_space>replicate<seq2seq4repair_space>after<seq2seq4repair_space>container<seq2seq4repair_space>1<seq2seq4repair_space>was<seq2seq4repair_space>brought<seq2seq4repair_space>up." , "6" , state . remainingGuesses ) ; Assert . assertEquals ( sessionId , state . sessionId ) ; Assert . assertEquals ( "3" , state . smallest ) ; Assert . assertEquals ( "98" , state . biggest ) ; response = client . execute ( JSFFailoverTestCase . buildPostRequest ( url1 , state . sessionId , state . jsfViewState , "50" ) ) ; try { Assert . assertEquals ( SC_OK , response . getStatusLine ( ) . getStatusCode ( ) ) ; state = JSFFailoverTestCase . parseState ( response , sessionId ) ; } finally { org . apache . http . client . utils . HttpClientUtils . closeQuietly ( response ) ; } Assert . assertEquals ( sessionId , state . sessionId ) ; Assert . assertEquals ( "5" , state . remainingGuesses ) ; Assert . assertEquals ( "3" , state . smallest ) ; Assert . assertEquals ( "49" , state . biggest ) ; } finally { org . apache . http . client . utils . HttpClientUtils . closeQuietly ( client ) ; }

Fix:
log . info ( ( ( ( "URLs<seq2seq4repair_space>are:<seq2seq4repair_space>" + url1 ) + ",<seq2seq4repair_space>" ) + url2 ) ) ;