@Test
public void compilationGauge() throws Exception {

    when(cm.isCompilationTimeMonitoringSupported()).thenReturn(true);
    when(cm.getTotalCompilationTime()).thenReturn(100L);
    assertThat(gauge.getValue()).isEqualTo(NOT_AVAILABLE);
    when(cm.getTotalCompilationTime()).thenReturn(120L);
    Thread.sleep(1200);
    assertThat(gauge.getValue()).isEqualTo(20L);
}