public void shouldCallDeploymentTransformers() throws Exception
{
TestExceptionDeployThrower.shouldThrow = new DeploymentException("Could not handle ba", new IllegalArgumentException());
Mockito.when(serviceLoader.all(DeploymentExceptionTransformer.class)).thenReturn(Arrays.asList(transformer));
fire(new DeployDeployment(
container,
new Deployment(new DeploymentDescription("test", ShrinkWrap.create(JavaArchive.class))
.setExpectedException(IllegalArgumentException.class))));
Mockito.verify(transformer, Mockito.times(1)).transform(Mockito.isA(Exception.class));