In the previous example we created an anonymous class. This has the disadvantage that we cannot reuse it in another test class. Take this anonymous class out and write a class "MyStopwatch.java" that extends from the Stopwatch class. You can copy the methods from the previous example.
After creating this class use it in the class "MySimpleTest" as follows:
@Rule
public final MyStopwatch stopwatch = new MyStopwatch() ;