public boolean shouldRecord() {
        return this.recordingLevel.shouldRecord(config.recordLevel().id);
    }
@Test
    public void testShouldRecordForDebugLevelSensor() {
        Sensor debugSensor = new Sensor(null, "debugSensor", null, INFO_CONFIG, Time.SYSTEM,
            0, Sensor.RecordingLevel.DEBUG);
        assertFalse(debugSensor.shouldRecord());

        debugSensor = new Sensor(null, "debugSensor", null, DEBUG_CONFIG, Time.SYSTEM,
             0, Sensor.RecordingLevel.DEBUG);
        assertTrue(debugSensor.shouldRecord());

        debugSensor = new Sensor(null, "debugSensor", null, TRACE_CONFIG, Time.SYSTEM,
             0, Sensor.RecordingLevel.DEBUG);
        assertTrue(debugSensor.shouldRecord());
    }