Buggy code:
@ RunWith ( Arquillian . class ) @ ServerSetup ( { SwitchIdentityTestCase . SecurityDomainsSetup . class , SwitchIdentityTestCase . SecurityRealmsSetup . class , SwitchIdentityTestCase . RemotingSetup . class } ) @ RunAsClient public class SwitchIdentityTestCase { private static final String EJB_OUTBOUND_SOCKET_BINDING = "ejb-outbound" ; private static Logger LOGGER = Logger . getLogger ( SwitchIdentityTestCase . class ) ; private static final String EJB_OUTBOUND_REALM = "ejb-outbound-realm" ; private static final String SECURITY_DOMAIN_NAME = "switch-identity-test" ; private static final PathAddress ADDR_SOCKET_BINDING = PathAddress . pathAddress ( ) . append ( SOCKET_BINDING_GROUP , "standard-sockets" ) . append ( REMOTE_DESTINATION_OUTBOUND_SOCKET_BINDING , SwitchIdentityTestCase . EJB_OUTBOUND_SOCKET_BINDING ) ; private static final PathAddress ADDR_REMOTING_CONNECTOR = PathAddress . pathAddress ( ) . append ( SUBSYSTEM , "remoting" ) . append ( "remote-outbound-connection" , "ejb-outbound-connection" ) ; private static final Configuration CLIENT_LOGIN_CONFIG = new Configuration ( ) { @ Override public AppConfigurationEntry [ ] getAppConfigurationEntry ( String name ) { } } ; @ ArquillianResource private ManagementClient mgmtClient ; @ Deployment public static JavaArchive createDeployment ( ) throws IOException { final JavaArchive jar = ShrinkWrap . create ( JavaArchive . class , ( ( EJBUtil . APPLICATION_NAME ) + ".jar" ) ) ; jar . addClasses ( GuestDelegationLoginModule . class , EJBUtil . class , Manage . class , BridgeBean . class , TargetBean . class , CurrentUserCredential . class , ServerSecurityInterceptor . class , ClientSecurityInterceptor . class ) ; jar . addAsManifestResource ( SwitchIdentityTestCase . class . getPackage ( ) , "jboss-ejb3.xml" , "jboss-ejb3.xml" ) ; jar . addAsManifestResource ( new StringAsset ( ClientSecurityInterceptor . class . getName ( ) ) , "services//org.jboss.ejb.client.EJBClientInterceptor" ) ; jar . addAsManifestResource ( SwitchIdentityTestCase . class . getPackage ( ) , "jboss-ejb-client.xml" , "jboss-ejb-client.xml" ) ; <START_BUG> jar . addAsManifestResource ( Utils . getJBossDeploymentStructure ( "org.jboss.remoting3" , "org.jboss.as.domain-management" , "org.jboss.as.controller" ) , "jboss-deployment-structure.xml" ) ; <END_BUG> final Properties props = EJBUtil . createEjbClientConfiguration ( StringUtils . strip ( TestSuiteEnvironment . getServerAddress ( ) , "[]" ) ) ; final ByteArrayOutputStream baos = new ByteArrayOutputStream ( ) ; props . store ( baos , null ) ; jar . addAsResource ( new ByteArrayAsset ( baos . toByteArray ( ) ) , "jboss-ejb-client.properties" ) ; return jar ; } @ Test public void testSecurityContextAssociation ( ) throws Exception { } @ Test public void testClientLoginModule ( ) throws Exception { } private void callUsingClientLoginModul ( String userName , boolean hasRole1 , boolean hasRole2 ) throws Exception { } private void callUsingSecurityContextAssociation ( String userName , boolean hasRole1 , boolean hasRole2 ) throws Exception { } private void testMethodAccess ( Manage bean , SwitchIdentityTestCase . ManageMethodEnum method , boolean hasAccess ) { } static class SecurityDomainsSetup extends AbstractSecurityDomainsServerSetupTask { @ Override protected SecurityDomain [ ] getSecurityDomains ( ) { } } static class SecurityRealmsSetup extends AbstractSecurityRealmsServerSetupTask { @ Override protected SecurityRealm [ ] getSecurityRealms ( ) { } } static class RemotingSetup implements ServerSetupTask { public void setup ( ManagementClient managementClient , String containerId ) throws Exception { } public void tearDown ( ManagementClient managementClient , String containerId ) throws Exception { } } private enum ManageMethodEnum { ROLE1 , ROLE2 , ALLROLES ; } }

Fix:
jar . addAsManifestResource ( Utils . getJBossDeploymentStructure ( "org.jboss.remoting3" , "org.jboss.as.domain-management" , "org.jboss.as.controller" , "org.jboss.as.core-security" ) , "jboss-deployment-structure.xml" ) ;