Testing Java Interfaces With JUnit 
by Matt Albrecht 

Listing One
  Sample1TestI.java test suite generation:
  InterfaceTestSuite suite = new InterfaceTestSuite(
Sample1TestI.class );

Listing Two
   Sample1ImplTest.java test suite generation:
       public static Test suite() {
    InterfaceTestSuite suite = Sample1TestI.suite();
    suite.addTestSuite( THIS_CLASS );
    suite.addFactory( new ImplFactory() {
        public Object createImplObject() {
            return new Sample1Impl();
        }
    } );
                   return suite;
}


Listing Three
   Sample2TestI.java test suite generation:
       public static InterfaceTestSuite suite() {
    InterfaceTestSuite suite = Sample1TestI.suite();
    suite.addTestSuite( THIS_CLASS );
                   return suite;
}

Listing Four
Class signature for Sample5Impl:
    public class Sample5Impl extends Sample2
 implements Sample3, Sample4


 
