### Question:
CyclingSpeedAndCadenceMeasurementDataCallback extends ProfileReadResponse implements CyclingSpeedAndCadenceMeasurementCallback, CyclingSpeedAndCadenceCallback { @SuppressWarnings("StatementWithEmptyBody") @Override public void onCrankMeasurementReceived(@NonNull final BluetoothDevice device, final int crankRevolutions, final int lastCrankEventTime) { if (mLastCrankEventTime == lastCrankEventTime) return; if (mLastCrankRevolutions >= 0) { float timeDifference; if (lastCrankEventTime < mLastCrankEventTime) timeDifference = (65535 + lastCrankEventTime - mLastCrankEventTime) / 1024.0f; else timeDifference = (lastCrankEventTime - mLastCrankEventTime) / 1024.0f; final float crankCadence = (crankRevolutions - mLastCrankRevolutions) * 60.0f / timeDifference; if (crankCadence > 0) { final float gearRatio = mWheelCadence >= 0 ? mWheelCadence / crankCadence : 0.0f; onCrankDataChanged(device, crankCadence, gearRatio); } else { } } mLastCrankRevolutions = crankRevolutions; mLastCrankEventTime = lastCrankEventTime; } CyclingSpeedAndCadenceMeasurementDataCallback(); protected  CyclingSpeedAndCadenceMeasurementDataCallback(final Parcel in); @Override void onDataReceived(@NonNull final BluetoothDevice device, @NonNull final Data data); @Override void onWheelMeasurementReceived(@NonNull final BluetoothDevice device, final long wheelRevolutions, final int lastWheelEventTime); @SuppressWarnings("StatementWithEmptyBody") @Override void onCrankMeasurementReceived(@NonNull final BluetoothDevice device, final int crankRevolutions, final int lastCrankEventTime);  }### Answer:
@Test public void onCrankMeasurementReceived() { final DataReceivedCallback callback = new CyclingSpeedAndCadenceMeasurementDataCallback() { @Override public void onCrankMeasurementReceived(@NonNull final BluetoothDevice device, final int crankRevolutions, final int lastCrankEventTime) { assertEquals("Crank measurement", 345, crankRevolutions); assertEquals("Crank last event time", 2000, lastCrankEventTime); } @Override public void onInvalidDataReceived(@NonNull final BluetoothDevice device, @NonNull final Data data) { assertEquals("Correct CSC data reported as invalid", 1, 2); } @Override public void onDistanceChanged(@NonNull final BluetoothDevice device, final float totalDistance, final float distance, final float speed) { } @Override public void onCrankDataChanged(@NonNull final BluetoothDevice device, final float crankCadence, final float gearRatio) { } }; final MutableData data = new MutableData(new byte[5]); assertTrue(data.setByte(0x02, 0)); assertTrue(data.setValue(345, Data.FORMAT_UINT16, 1)); assertTrue(data.setValue(2000, Data.FORMAT_UINT16, 3)); callback.onDataReceived(null, data); }