public String getMountedExternalStorageDirectoryPath() {
    String path = null;
    String state = Environment.getExternalStorageState();
    if (Environment.MEDIA_MOUNTED.equals(state) ||
        Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)) {
      path = getExternalStorageDirectoryPath();
    }
    return path;
  }
@Test
  public void getMountedExternalStorageDirectoryPathReturnsNullWhenNoFs() {
    ShadowEnvironment.setExternalStorageState(Environment.MEDIA_NOFS);
    assertThat(contextUtil.getMountedExternalStorageDirectoryPath(), is(nullValue()));
  }