@Test
public void should_not_count_negative_tests() throws URISyntaxException {

  SensorContextTester context = SensorContextTester.create(new File(""));
  parser.collect(context, getDir("negativeTestTime"));
  // Test times : -1.120, 0.644, 0.015 -> computed time : 0.659, ignore negative time.
  assertThat(context.measure(":java.Foo", CoreMetrics.SKIPPED_TESTS).value()).isEqualTo(0);
  assertThat(context.measure(":java.Foo", CoreMetrics.TESTS).value()).isEqualTo(6);
  assertThat(context.measure(":java.Foo", CoreMetrics.TEST_ERRORS).value()).isEqualTo(0);
  assertThat(context.measure(":java.Foo", CoreMetrics.TEST_FAILURES).value()).isEqualTo(0);
  assertThat(context.measure(":java.Foo", CoreMetrics.TEST_EXECUTION_TIME).value()).isEqualTo(659);
}