@Test
public void testUpdateDetectorTrainingTime() {

    val timestamp = DateUtil.toUtcDate("2020-07-15 20:00:00").toInstant().toEpochMilli();
    val uuid = this.someUuid.toString();
    val testDetectorMappingSpanContext = new SpanContext(uuid, uuid, uuid);
    val testChildSpan = noOpsTracer.buildSpan("update-detector-training-time").asChildOf(testDetectorMappingSpanContext).start();
    when(trace.extractParentSpan(httpHeaders)).thenReturn(testDetectorMappingSpanContext);
    when(trace.startSpan("update-detector-training-time", testDetectorMappingSpanContext)).thenReturn(testChildSpan);
    controllerUnderTest.updateDetectorTrainingTime(uuid, timestamp, httpHeaders);
    verify(detectorService, times(1)).updateDetectorTrainingTime(uuid, timestamp);
}