// Path: src/main/java/com/google/code/tempusfugit/ClassInvariantViolation.java
// public class ClassInvariantViolation extends RuntimeException {
// 
//     public ClassInvariantViolation() {
//         super();
//     }
// 
//     public ClassInvariantViolation(String message) {
//         super(message);
//     }
// 
//     public ClassInvariantViolation(String message, Throwable cause) {
//         super(message, cause);
//     }
// 
//     public ClassInvariantViolation(Throwable cause) {
//         super(cause);
//     }
// }
// 
// Path: src/main/java/com/google/code/tempusfugit/temporal/Duration.java
// public static Duration millis(long millis) {
//     validate(millis, TimeUnit.MILLISECONDS);
//     return new Duration(millis, TimeUnit.MILLISECONDS);
// }


import com.google.code.tempusfugit.ClassInvariantViolation;
import org.junit.Test;
import java.util.Date;
import static com.google.code.tempusfugit.temporal.Duration.millis;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.Is.is;
import static org.hamcrest.core.IsEqual.equalTo;
        assertThat(timer.elapsedTime(), is(millis(0)));
    }

    @Test (expected = ClassInvariantViolation.class)
    public void stoppedThenStarted() {
        timer.reset();
        timer.lap();
        clock.incrementBy(millis(100));
        timer.reset();
        timer.elapsedTime();
    }

    @Test
    public void stoppedButNotStarted() {
        timer.lap();
        assertThat(timer.elapsedTime(), is(millis(0)));
    }

    @Test
    public void returnsTotalElapsedTime() {
        timer.reset();
        clock.incrementBy(millis(5));
        timer.lap();
        assertThat(timer.elapsedTime(), is(equalTo(millis(5))));
    }

    @Test
    public void stoppingMultipleTimesReturnsTotalElapsedTime() {
        timer.reset();
        clock.incrementBy(millis(5));
// Path: src/main/java/com/google/code/tempusfugit/ClassInvariantViolation.java
// public class ClassInvariantViolation extends RuntimeException {
// 
//     public ClassInvariantViolation() {
//         super();
//     }
// 
//     public ClassInvariantViolation(String message) {
//         super(message);
//     }
// 
//     public ClassInvariantViolation(String message, Throwable cause) {
//         super(message, cause);
//     }
// 
//     public ClassInvariantViolation(Throwable cause) {
//         super(cause);
//     }
// }
// 
// Path: src/main/java/com/google/code/tempusfugit/temporal/Duration.java
// public static Duration millis(long millis) {
//     validate(millis, TimeUnit.MILLISECONDS);
//     return new Duration(millis, TimeUnit.MILLISECONDS);
// }


// Path: src/test/java/com/google/code/tempusfugit/temporal/ThreadLocalTimerTest.java
import com.google.code.tempusfugit.ClassInvariantViolation;
import org.junit.Test;
import java.util.Date;
import static com.google.code.tempusfugit.temporal.Duration.millis;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.Is.is;
import static org.hamcrest.core.IsEqual.equalTo;

        assertThat(timer.elapsedTime(), is(millis(0)));
    }

    @Test (expected = ClassInvariantViolation.class)
    public void stoppedThenStarted() {
        timer.reset();
        timer.lap();
        clock.incrementBy(millis(100));
        timer.reset();
        timer.elapsedTime();
    }

    @Test
    public void stoppedButNotStarted() {
        timer.lap();
        assertThat(timer.elapsedTime(), is(millis(0)));
    }

    @Test
    public void returnsTotalElapsedTime() {
        timer.reset();
        clock.incrementBy(millis(5));
        timer.lap();
        assertThat(timer.elapsedTime(), is(equalTo(millis(5))));
    }

    @Test
    public void stoppingMultipleTimesReturnsTotalElapsedTime() {
        timer.reset();
        clock.incrementBy(millis(5));
        timer.lap();