@Test public void testParseRequestIdFromUuid() throws Exception { assertThat(PeerAdvertisementFactory.parseRequestIdFromUuid(new UUID(1, 1)), is("000000000001")); assertThat(PeerAdvertisementFactory.parseRequestIdFromUuid(new UUID(1, 2)), is("000000000002")); assertThat(PeerAdvertisementFactory.parseRequestIdFromUuid(new UUID(1, 100)), is("000000000064")); assertThat(PeerAdvertisementFactory.parseRequestIdFromUuid(new UUID(1, 1000)), is("0000000003e8")); assertThat(PeerAdvertisementFactory.parseRequestIdFromUuid(new UUID(1, 10000)), is("000000002710")); assertThat(PeerAdvertisementFactory.parseRequestIdFromUuid(new UUID(1, 1000000)), is("0000000f4240")); assertThat(PeerAdvertisementFactory.parseRequestIdFromUuid(new UUID(1, 100000000)), is("000005f5e100")); assertThat(PeerAdvertisementFactory.parseRequestIdFromUuid(new UUID(1, 999999999)), is("00003b9ac9ff")); assertThat(PeerAdvertisementFactory.parseRequestIdFromUuid(new UUID(1, 99999999999901L)), is("5af3107a3f9d")); }
public static String parseRequestIdFromUuid(UUID provideBluetoothMacAddressRequestUuid) { String uuidAsString = provideBluetoothMacAddressRequestUuid.toString(); return uuidAsString.substring( uuidAsString.length() - BluetoothUtils.BLUETOOTH_ADDRESS_BYTE_COUNT * 2, uuidAsString.length()); }
PeerAdvertisementFactory { public static String parseRequestIdFromUuid(UUID provideBluetoothMacAddressRequestUuid) { String uuidAsString = provideBluetoothMacAddressRequestUuid.toString(); return uuidAsString.substring( uuidAsString.length() - BluetoothUtils.BLUETOOTH_ADDRESS_BYTE_COUNT * 2, uuidAsString.length()); } }
PeerAdvertisementFactory { public static String parseRequestIdFromUuid(UUID provideBluetoothMacAddressRequestUuid) { String uuidAsString = provideBluetoothMacAddressRequestUuid.toString(); return uuidAsString.substring( uuidAsString.length() - BluetoothUtils.BLUETOOTH_ADDRESS_BYTE_COUNT * 2, uuidAsString.length()); }  }
PeerAdvertisementFactory { public static String parseRequestIdFromUuid(UUID provideBluetoothMacAddressRequestUuid) { String uuidAsString = provideBluetoothMacAddressRequestUuid.toString(); return uuidAsString.substring( uuidAsString.length() - BluetoothUtils.BLUETOOTH_ADDRESS_BYTE_COUNT * 2, uuidAsString.length()); }  static AdvertiseData createAdvertiseDataToServiceData(
            UUID serviceUuid, int beaconAdExtraInformation, String bluetoothMacAddress); static AdvertiseData createAdvertiseDataToServiceData(
            UUID serviceUuid, int beaconAdExtraInformation, String bluetoothMacAddress,
            AdvertiseData.Builder builder); static AdvertiseData createAdvertiseDataToManufacturerData(
            int manufacturerId, int beaconAdLengthAndType, UUID serviceUuid,
            int beaconAdExtraInformation, String bluetoothMacAddress); static AdvertiseData createAdvertiseDataToManufacturerData(
            int manufacturerId, int beaconAdLengthAndType, UUID serviceUuid,
            int beaconAdExtraInformation, String bluetoothMacAddress,
            AdvertiseData.Builder builder, ByteArrayOutputStream byteArrayOutputStream,
            DataOutput dataOutputStream); static PeerProperties parsedAdvertisementToPeerProperties(
            BlePeerDiscoveryUtils.ParsedAdvertisement parsedAdvertisement); static PeerProperties manufacturerDataToPeerProperties(byte[] manufacturerData, UUID serviceUuid); static UUID createProvideBluetoothMacAddressUuid(UUID serviceUuid, String requestId); static UUID generateNewProvideBluetoothMacAddressRequestUuid(UUID serviceUuid); static String parseRequestIdFromUuid(UUID provideBluetoothMacAddressRequestUuid); }
PeerAdvertisementFactory { public static String parseRequestIdFromUuid(UUID provideBluetoothMacAddressRequestUuid) { String uuidAsString = provideBluetoothMacAddressRequestUuid.toString(); return uuidAsString.substring( uuidAsString.length() - BluetoothUtils.BLUETOOTH_ADDRESS_BYTE_COUNT * 2, uuidAsString.length()); }  static AdvertiseData createAdvertiseDataToServiceData(
            UUID serviceUuid, int beaconAdExtraInformation, String bluetoothMacAddress); static AdvertiseData createAdvertiseDataToServiceData(
            UUID serviceUuid, int beaconAdExtraInformation, String bluetoothMacAddress,
            AdvertiseData.Builder builder); static AdvertiseData createAdvertiseDataToManufacturerData(
            int manufacturerId, int beaconAdLengthAndType, UUID serviceUuid,
            int beaconAdExtraInformation, String bluetoothMacAddress); static AdvertiseData createAdvertiseDataToManufacturerData(
            int manufacturerId, int beaconAdLengthAndType, UUID serviceUuid,
            int beaconAdExtraInformation, String bluetoothMacAddress,
            AdvertiseData.Builder builder, ByteArrayOutputStream byteArrayOutputStream,
            DataOutput dataOutputStream); static PeerProperties parsedAdvertisementToPeerProperties(
            BlePeerDiscoveryUtils.ParsedAdvertisement parsedAdvertisement); static PeerProperties manufacturerDataToPeerProperties(byte[] manufacturerData, UUID serviceUuid); static UUID createProvideBluetoothMacAddressUuid(UUID serviceUuid, String requestId); static UUID generateNewProvideBluetoothMacAddressRequestUuid(UUID serviceUuid); static String parseRequestIdFromUuid(UUID provideBluetoothMacAddressRequestUuid);  }