### Question:
CoreBluetoothDetector implements BluetoothDetector { @Override public Observable<Boolean> enabled() { return sharedBluetoothEnabled.map(c -> c == Capability.ENABLED); } CoreBluetoothDetector(Context context); @Override Observable<Capability> capability(); @Override Observable<Boolean> enabled();  }### Answer:
@Test public void enabled() { when(bluetoothAdapter.isEnabled()).thenReturn(true); when(BluetoothAdapter.getDefaultAdapter()).thenReturn(bluetoothAdapter); enabledTestObserver = coreBluetoothDetector.enabled().test(); capabilityTestObserver = coreBluetoothDetector.capability().test(); enabledTestObserver.assertValue(true); capabilityTestObserver.assertValue(BluetoothDetector.Capability.ENABLED); }