I have three bean classes,A,B and C.
Class A depends on class B and Class C properties.
How can i write Junit test case to test the Class A without loading Class B and Class C?
I know this question is verbose,if anyone have idea please give some hints.
Regards,
Raju komaturi
Use a Mock framework like EasyMock or Mockito and inject mock versions of B and C.
You should probably do that completely without Spring, just inject the Mocks programmatically.
Example: