Buggy code:
@ RunWith ( Arquillian . class ) public class Hibernate3EmbeddedProviderTestCase { private static final String ARCHIVE_NAME = "hibernate3_test" ; @ ArquillianResource private ManagementClient managementClient ; private static final String persistence_xml = "<?xml<seq2seq4repair_space>version=\"1.0\"<seq2seq4repair_space>encoding=\"UTF-8\"?><seq2seq4repair_space>" + ( ( ( ( ( ( ( ( ( ( "<persistence<seq2seq4repair_space>xmlns=\"http:////java.sun.com//xml//ns//persistence\"<seq2seq4repair_space>version=\"1.0\">" + "<seq2seq4repair_space><persistence-unit<seq2seq4repair_space>name=\"hibernate3_pc\">" ) + "<seq2seq4repair_space><description>Persistence<seq2seq4repair_space>Unit." ) + "<seq2seq4repair_space><//description>" ) + "<seq2seq4repair_space><jta-data-source>java:jboss//datasources//ExampleDS<//jta-data-source>" ) + "<properties><seq2seq4repair_space><property<seq2seq4repair_space>name=\"hibernate.hbm2ddl.auto\"<seq2seq4repair_space>value=\"create-drop\"//>" ) + "<property<seq2seq4repair_space>name=\"hibernate.show_sql\"<seq2seq4repair_space>value=\"true\"//>" ) + "<property<seq2seq4repair_space>name=\"jboss.as.jpa.providerModule\"<seq2seq4repair_space>value=\"hibernate3-bundled\"//>" ) + "<//properties>" ) + "<seq2seq4repair_space><//persistence-unit>" ) + "<//persistence>" ) ; private static final String web_persistence_xml = "<?xml<seq2seq4repair_space>version=\"1.0\"<seq2seq4repair_space>encoding=\"UTF-8\"?><seq2seq4repair_space>" + ( ( ( ( ( ( ( ( ( ( "<persistence<seq2seq4repair_space>xmlns=\"http:////java.sun.com//xml//ns//persistence\"<seq2seq4repair_space>version=\"1.0\">" + "<seq2seq4repair_space><persistence-unit<seq2seq4repair_space>name=\"web_hibernate3_pc\">" ) + "<seq2seq4repair_space><description>Persistence<seq2seq4repair_space>Unit." ) + "<seq2seq4repair_space><//description>" ) + "<seq2seq4repair_space><jta-data-source>java:jboss//datasources//ExampleDS<//jta-data-source>" ) + "<properties><seq2seq4repair_space><property<seq2seq4repair_space>name=\"hibernate.hbm2ddl.auto\"<seq2seq4repair_space>value=\"create-drop\"//>" ) + "<property<seq2seq4repair_space>name=\"hibernate.show_sql\"<seq2seq4repair_space>value=\"true\"//>" ) + "<property<seq2seq4repair_space>name=\"jboss.as.jpa.providerModule\"<seq2seq4repair_space>value=\"hibernate3-bundled\"//>" ) + "<//properties>" ) + "<seq2seq4repair_space><//persistence-unit>" ) + "<//persistence>" ) ; private static void addHibernate3JarsToEar ( EnterpriseArchive ear ) { } @ Deployment public static Archive < ? > deploy ( ) throws Exception { } @ ArquillianResource private InitialContext iniCtx ; protected < T > T lookup ( String beanName , Class < T > interfaceType ) throws NamingException { } private void dumpJndi ( String s ) { } private void dumpTreeEntry ( NamingEnumeration < NameClassPair > list , String s ) throws NamingException { } @ Test public void testSimpleCreateAndLoadEntities ( ) throws Exception { } private String performCall ( String urlPattern , String param ) throws Exception { <START_BUG> return HttpRequest . get ( ( ( ( ( ( "http:////" + ( managementClient . getMgmtAddress ( ) ) ) + ":8080//hibernate3_test//" ) + urlPattern ) + "?input=" ) + param ) , 10 , TimeUnit . SECONDS ) ; <END_BUG> } @ Test public void testServletSubDeploymentRead ( ) throws Exception { } }

Fix:
return HttpRequest . get ( ( ( ( ( ( managementClient . getWebUri ( ) ) + "//hibernate3_test//" ) + urlPattern ) + "?input=" ) + param ) , 10 , TimeUnit . SECONDS ) ;