public boolean shouldRecord() {
        return this.recordingLevel.shouldRecord(config.recordLevel().id);
    }
@Test
    public void testShouldRecordForInfoLevelSensor() {
        Sensor infoSensor = new Sensor(null, "infoSensor", null, INFO_CONFIG,  Time.SYSTEM,
            0, Sensor.RecordingLevel.INFO);
        assertTrue(infoSensor.shouldRecord());

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

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