@Override
	public void onDataReceived(@NonNull final BluetoothDevice device, @NonNull final Data data) {
		super.onDataReceived(device, data);

		if (data.size() == 1) {
			final Integer level = data.getIntValue(Data.FORMAT_UINT8, 0);
			if (level != null && level <= AlertLevelCallback.ALERT_HIGH) {
				onAlertLevelChanged(device, level);
				return;
			}
		}
		onInvalidDataReceived(device, data);
	}
@Test
	public void onAlertLevelChanged_mild() {
		final DataReceivedCallback callback = new AlertLevelDataCallback() {
			@Override
			public void onAlertLevelChanged(@NonNull final BluetoothDevice device, final int level) {
				assertEquals("Mild alert received", AlertLevelCallback.ALERT_MILD, level);
			}

			@Override
			public void onInvalidDataReceived(@NonNull final BluetoothDevice device, @NonNull final Data data) {
				super.onInvalidDataReceived(device, data);
				fail("Correct data reported as invalid");
			}
		};
		final Data data = AlertLevelData.mildAlert();
		callback.onDataReceived(null, data);

		assertEquals("Correct value", 0x01, AlertLevelCallback.ALERT_MILD);
	}