code: public Archive<?> generateDeployment(TestDeployment testDeployment, Collection<ProtocolArchiveProcessor> processors) {
          WebArchive protocol = new ProtocolDeploymentAppender().createAuxiliaryArchive();
  
          Archive<?> applicationArchive = testDeployment.getApplicationArchive();
          Collection<Archive<?>> auxiliaryArchives = testDeployment.getAuxiliaryArchives();
  
          Processor processor = new Processor(testDeployment, processors);
  
          if (Validate.isArchiveOfType(EnterpriseArchive.class, applicationArchive)) {
              return handleArchive(applicationArchive.as(EnterpriseArchive.class), auxiliaryArchives, protocol, processor,
                  testDeployment);
          }
  
          if (Validate.isArchiveOfType(WebArchive.class, applicationArchive)) {
              return handleArchive(applicationArchive.as(WebArchive.class), auxiliaryArchives, protocol, processor);
          }
  
          if (Validate.isArchiveOfType(JavaArchive.class, applicationArchive)) {
              return handleArchive(applicationArchive.as(JavaArchive.class), auxiliaryArchives, protocol, processor);
          }
  
          throw new IllegalArgumentException(ServletProtocolDeploymentPackager.class.getName() +
              " can not handle archive of type " + applicationArchive.getClass().getName());
      }
docs: /* (non-Javadoc)
  @see org.jboss.arquillian.spi.DeploymentPackager#generateDeployment(org.jboss.arquillian.spi.TestDeployment)