public void callback(Context context, ClassEvent event) throws Exception
{
ServiceLoader serviceLoader = context.getServiceLoader();
DeploymentPackager packager = serviceLoader.onlyOne(DeploymentPackager.class);
DeploymentGenerator generator = context.get(DeploymentGenerator.class);
Validate.stateNotNull(generator, "No " + DeploymentGenerator.class.getName() + " found in context");
TestDeployment deployment = generator.generate(event.getTestClass());
Archive<?> archive = packager.generateDeployment(context, deployment);
context.add(TestDeployment.class, deployment);
context.add(Archive.class, archive);
}