Iโve already entered Google, but it seems to me that itโs hard to find topics about mock injection dependency objects (EJB 3.0).
public class MyTestBean { @EJB ILoginService mLoginService; public void doLogin() { if (!mLoginService.login(name, pass)) {
When running tests with openEJB, I want the name LoginService.login (name, pass) to return true. Is there any way to make fun of LoginService bean?
(Currently, the login method uses some JAAS things that I cannot simulate during tests.)
source share