### Question:
AndroidContextUtil { public String getMountedExternalStorageDirectoryPath() { String path = null; String state = Environment.getExternalStorageState(); if (state.equals(Environment.MEDIA_MOUNTED) || state.equals(Environment.MEDIA_MOUNTED_READ_ONLY)) { path = getExternalStorageDirectoryPath(); } return path; } AndroidContextUtil();  AndroidContextUtil(ContextWrapper contextWrapper); void setupProperties(LoggerContext context); String getMountedExternalStorageDirectoryPath(); @TargetApi(8) @SuppressWarnings("deprecation") String getExternalStorageDirectoryPath(); @TargetApi(8) String getExternalFilesDirectoryPath(); String getCacheDirectoryPath(); String getExternalCacheDirectoryPath(); String getPackageName(); String getFilesDirectoryPath(); @TargetApi(21) String getNoBackupFilesDirectoryPath(); String getDatabaseDirectoryPath(); String getDatabasePath(String databaseName); String getVersionCode(); String getVersionName();  }### Answer:
@Test public void getMountedExternalStorageDirectoryPathReturnsNullWhenRemoved() { ShadowEnvironment.setExternalStorageState(Environment.MEDIA_REMOVED); assertThat(contextUtil.getMountedExternalStorageDirectoryPath(), is(nullValue())); }
@Test public void getMountedExternalStorageDirectoryPathReturnsNullWhenBadRemoval() { ShadowEnvironment.setExternalStorageState(Environment.MEDIA_BAD_REMOVAL); assertThat(contextUtil.getMountedExternalStorageDirectoryPath(), is(nullValue())); }
@Test public void getMountedExternalStorageDirectoryPathReturnsNullWhenChecking() { ShadowEnvironment.setExternalStorageState(Environment.MEDIA_CHECKING); assertThat(contextUtil.getMountedExternalStorageDirectoryPath(), is(nullValue())); }
@Test public void getMountedExternalStorageDirectoryPathReturnsNullWhenEjecting() { ShadowEnvironment.setExternalStorageState(Environment.MEDIA_EJECTING); assertThat(contextUtil.getMountedExternalStorageDirectoryPath(), is(nullValue())); }
@Test public void getMountedExternalStorageDirectoryPathReturnsNullWhenNoFs() { ShadowEnvironment.setExternalStorageState(Environment.MEDIA_NOFS); assertThat(contextUtil.getMountedExternalStorageDirectoryPath(), is(nullValue())); }
@Test public void getMountedExternalStorageDirectoryPathReturnsNullWhenUnknown() { ShadowEnvironment.setExternalStorageState(Environment.MEDIA_UNKNOWN); assertThat(contextUtil.getMountedExternalStorageDirectoryPath(), is(nullValue())); }
@Test public void getMountedExternalStorageDirectoryPathReturnsNullWhenUnmountable() { ShadowEnvironment.setExternalStorageState(Environment.MEDIA_UNMOUNTABLE); assertThat(contextUtil.getMountedExternalStorageDirectoryPath(), is(nullValue())); }
@Test public void getMountedExternalStorageDirectoryPathReturnsNullWhenShared() { ShadowEnvironment.setExternalStorageState(Environment.MEDIA_SHARED); assertThat(contextUtil.getMountedExternalStorageDirectoryPath(), is(nullValue())); }