import junit.framework.*; import java.util.BitSet; public class Bitihulgatest extends TestCase{ BitSet b=new BitSet(); public void setUp(){ b.set(2, true); System.out.println("Testi algus"); } public void tearDown(){ System.out.println("Testi ots"); } public void testPysti(){ assertTrue(b.get(2)); } public void testPikali(){ assertFalse(b.get(1)); } public static void main(String[] argumendid){ junit.textui.TestRunner.run(new TestSuite(Bitihulgatest.class)); } } /* C:\java\jaagup\testid>javac -classpath junit.jar;. Bitihulgatest.java C:\java\jaagup\testid>java -cp junit.jar;. Bitihulgatest .Testi algus Testi ots .Testi algus Testi ots Time: 0,01 OK (2 tests) */