I want to rebind some EJB's to their mock counterparts after initializing
the initial context trough class path scanning.
I tried following but this did not work:
@LocalClient
class MyTestClass() {
...
initialContext = new InitialContext(properties);
IFoo foo = EasyMock.createNiceMock(IFoo.class);
...
initialContext.rebind("FooImplLocal", foo);
initialContext.bind("inject", this);
...
}
The binding succeeds without a NamingException but however the original EJB
is injected in the MyTestClass...
Any ideas?