How to test abstract methods & interfaces using JUNIT?

Experts,

I need some pointers on the testing abstract methods & interfaces using JUNIT.

Thanks in advance,
Raj

RE : How to test abstract methods & interfaces using JUNIT?

Hi Raj,

for testing abstract methods, what I am doing is that I subclass the abstract class in order to have concrete implementation for testing or I simply test through my real concrete class.

About interface, why do you matter testing them?

I would like also to highlight that if you need to test a class that requires other, you can use mocking framework. The one I am using is called Mockito. It is available at : http://code.google.com/p/mockito/

It is a brand new one, but very good and very efficient. It has been inspired from EasyMock but has revisited its paradigm.

Olivier