import tester.*; // sample class --- it is not called 'Examples' @Example public class AnnotationExample { // private field private int n; // the required default constructor private AnnotationExample(){} // publicly available constructor public AnnotationExample(int n){ this.n = n; } // a sample private method // is this number bigger than the given one? private boolean biggerThan(int m){ return n > m; } // a sample test method --- does not start with 'test' @TestMethod public boolean weTestTheMethod(Tester t){ AnnotationExample foo = new AnnotationExample(3); AnnotationExample bar = new AnnotationExample(8); return t.checkExpect(foo.biggerThan(5), false) && t.checkExpect(foo.biggerThan(2), true) && t.checkExpect(bar.biggerThan(5), true) && t.checkExpect(bar.biggerThan(10), true, "test will fail"); } public static void main(String[] argv){ Tester.runFullReport(new AnnotationExample()); } }