BluetoothMacAddressResolutionHelper implements BluetoothDeviceDiscoverer.BluetoothDeviceDiscovererListener,
                   BluetoothGattManager.BluetoothGattManagerListener { public boolean getIsBluetoothMacAddressGattServerStarted() { return mBluetoothGattManager.getIsBluetoothMacAddressRequestServerStarted(); } BluetoothMacAddressResolutionHelper(
            Context context, BluetoothAdapter bluetoothAdapter, DiscoveryManager discoveryManager,
            UUID bleServiceUuid, UUID provideBluetoothMacAddressRequestUuid);  BluetoothMacAddressResolutionHelper(
            Context context, BluetoothAdapter bluetoothAdapter, DiscoveryManager discoveryManager,
            UUID bleServiceUuid, UUID provideBluetoothMacAddressRequestUuid, SharedPreferences preferences); UUID getProvideBluetoothMacAddressRequestUuid(); String getCurrentProvideBluetoothMacAddressRequestId(); boolean getIsProvideBluetoothMacAddressModeStarted(); boolean getIsBluetoothMacAddressGattServerStarted(); boolean getIsReceiveBluetoothMacAddressModeStarted(); synchronized void stopAllBluetoothMacAddressResolutionOperations(); synchronized boolean startProvideBluetoothMacAddressMode(String requestId); synchronized void stopProvideBluetoothMacAddressMode(); void provideBluetoothMacAddressToDevice(BluetoothDevice bluetoothDevice); synchronized void startReceiveBluetoothMacAddressMode(String requestId); synchronized void stopReceiveBluetoothMacAddressMode(); void startBluetoothMacAddressGattServer(String requestId); synchronized boolean startBluetoothDeviceDiscovery(); synchronized boolean stopBluetoothDeviceDiscovery(); @Override void onBluetoothDeviceDiscovered(BluetoothDevice bluetoothDevice); @Override void onBluetoothGattClientOperationCountInQueueChanged(int operationCountInQueue); @Override void onProvideBluetoothMacAddressResult(String requestId, boolean wasCompleted); @Override void onBluetoothMacAddressResolved(String bluetoothMacAddress);  }
@Test public void testGetIsBluetoothMacAddressGattServerStarted() throws Exception { Field fieldGattManager = mBluetoothMacAddressResolutionHelper.getClass() .getDeclaredField("mBluetoothGattManager"); fieldGattManager.setAccessible(true); fieldGattManager.set(mBluetoothMacAddressResolutionHelper, mMockBluetoothGattManager); when(mMockBluetoothGattManager.getIsBluetoothMacAddressRequestServerStarted()) .thenReturn(true); assertThat("Is true if a Bluetooth MAC address request (GATT) service has been added", mBluetoothMacAddressResolutionHelper.getIsBluetoothMacAddressGattServerStarted(), is(true)); verify(mMockBluetoothGattManager, times(1)).getIsBluetoothMacAddressRequestServerStarted(); when(mMockBluetoothGattManager.getIsBluetoothMacAddressRequestServerStarted()) .thenReturn(false); assertThat("Is false if a Bluetooth MAC address request (GATT) service not added", mBluetoothMacAddressResolutionHelper.getIsBluetoothMacAddressGattServerStarted(), is(false)); }