@Test
public void testGetRuntimeMillis() {

  final StopWatch sw = new StopWatch("foo").start();
  sw.lap("bar", false); // Should not be printed due to threshold
  try {
    Thread.sleep(1000);
  } catch (InterruptedException e) {
  }
  sw.lap("baz", true);
  sw.stop();
  final long rt = sw.getRuntimeMillis();
  assertTrue(rt < 50000);
}