@Override
    public boolean isSimilar(PiMeterCellConfig onosMeter, PiMeterCellConfig deviceMeter) {
        final PiMeterBand onosCommittedBand = onosMeter.committedBand();
        final PiMeterBand onosPeakBand = onosMeter.peakBand();
        final PiMeterBand deviceCommittedBand = deviceMeter.committedBand();
        final PiMeterBand devicePeakBand = deviceMeter.peakBand();

        // Fail fast, this can easily happen if we send a write very
        // close to a read, read can still return the default config
        if (deviceCommittedBand == null || devicePeakBand == null) {
            return false;
        }

        final long onosCir = onosCommittedBand.rate();
        final long onosCburst = onosCommittedBand.burst();
        final long onosPir = onosPeakBand.rate();
        final long onosPburst = onosPeakBand.burst();
        final long deviceCir = deviceCommittedBand.rate();
        final long deviceCburst = deviceCommittedBand.burst();
        final long devicePir = devicePeakBand.rate();
        final long devicePburst = devicePeakBand.burst();

        return isRateSimilar(onosCir, deviceCir) && isRateSimilar(onosPir, devicePir) &&
                isBurstSimilar(onosCburst, deviceCburst) && isBurstSimilar(onosPburst, devicePburst);
    }
@Test
    public void testWrongIsBurstSimilar() {
        PiMeterBand onosMeterBand;
        PiMeterBand deviceMeterBand;
        PiMeterCellConfig onosMeter;
        PiMeterCellConfig deviceMeter;
        for (Map.Entry<Long, Long> entry : WRONG_BURSTS.entrySet()) {
            onosMeterBand = new PiMeterBand(PiMeterBandType.COMMITTED, 0, entry.getKey());
            deviceMeterBand = new PiMeterBand(PiMeterBandType.COMMITTED, 0, entry.getValue());
            onosMeter = PiMeterCellConfig.builder()
                    .withMeterCellId(meterCellId)
                    .withMeterBand(onosMeterBand)
                    .withMeterBand(new PiMeterBand(PiMeterBandType.PEAK, 0, 0))
                    .build();
            deviceMeter = PiMeterCellConfig.builder()
                    .withMeterCellId(meterCellId)
                    .withMeterBand(deviceMeterBand)
                    .withMeterBand(new PiMeterBand(PiMeterBandType.PEAK, 0, 0))
                    .build();
            assertFalse(meterProgrammable.isSimilar(onosMeter, deviceMeter));
        }
    }