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

		if (data.size() < 3) {
			onInvalidDataReceived(device, data);
			return;
		}

		final int responseCode = data.getIntValue(Data.FORMAT_UINT8, 0);
		final int requestCode = data.getIntValue(Data.FORMAT_UINT8, 1);
		final int status = data.getIntValue(Data.FORMAT_UINT8, 2);

		if (responseCode != SC_OP_CODE_RESPONSE_CODE) {
			onInvalidDataReceived(device, data);
			return;
		}

		if (status != SC_RESPONSE_SUCCESS) {
			onSCOperationError(device, requestCode, status);
			return;
		}

		if (requestCode == SC_OP_CODE_REQUEST_SUPPORTED_SENSOR_LOCATIONS) {
			final int size = data.size() - 3;
			final int[] locations = new int[size];
			for (int i = 0; i < size; ++i) {
				locations[i] = data.getIntValue(Data.FORMAT_UINT8, 3 + i);
			}
			onSupportedSensorLocationsReceived(device, locations);
		} else {
			onSCOperationCompleted(device, requestCode);
		}
	}
@Test
	public void onSCOperationCompleted() {
		final MutableData data = new MutableData(new byte[] { 0x10, 0x01, 0x01});
		response.onDataReceived(null, data);
		assertTrue(success);
		assertEquals(0, errorCode);
		assertEquals(1, requestCode);
		assertNull(locations);
	}