### Question:
StorageNotLowTracker extends BroadcastReceiverConstraintTracker<Boolean> { @Override public Boolean getInitialState() { Intent intent = mAppContext.registerReceiver(null, getIntentFilter()); if (intent == null || intent.getAction() == null) { return true; } else { switch (intent.getAction()) { case Intent.ACTION_DEVICE_STORAGE_OK: return true; case Intent.ACTION_DEVICE_STORAGE_LOW: return false; default: return null; } } } StorageNotLowTracker(Context context); @Override Boolean getInitialState(); @Override IntentFilter getIntentFilter(); @Override void onBroadcastReceive(Context context, @NonNull Intent intent);  }### Answer:
@Test @SmallTest public void testGetInitialState_nullIntent() { mockContextReturns(null); assertThat(mTracker.getInitialState(), is(true)); }
@Test @SmallTest public void testGetInitialState_storageOkIntent() { mockContextReturns(new Intent(Intent.ACTION_DEVICE_STORAGE_OK)); assertThat(mTracker.getInitialState(), is(true)); }
@Test @SmallTest public void testGetInitialState_storageLowIntent() { mockContextReturns(new Intent(Intent.ACTION_DEVICE_STORAGE_LOW)); assertThat(mTracker.getInitialState(), is(false)); }