I'm wondering how to specify which mock implementation should be used during testing while using CDI.

I know that I can mark a mock implementation with @Alternative, but then I'd need to define it in beans.xml. I would like to have multiple mocks (for multiple objects). Lets say I have an OrderService and a EmailService. I'm writing some acceptance tests where I do not want EmailService to send emails. Then the other set of tests which are system tests - where I do want to send emails, but real order should not be created.

The ideal solution would be to specify Alternatives per each test method invocation, something like this:

```
@BeforeMethod
public void before(){
  // in this test suite we're using mock email service
  addAlternative(MockEmailService.class);
}
@Test
public void testMyStuff(){
  issueAnOrder(); // and verify that it worked. no emails sent!
}

```

Is it possible?