MountPointUtils { @NonNull public static MountPoint getInternalStorage() { final String externalStorage = System.getenv("EXTERNAL_STORAGE"); if (TextUtils.isEmpty(externalStorage)) { final MountPoint mountPoint = new MountPoint(Environment.getExternalStorageDirectory() .getAbsolutePath(), MountPoint.StorageType.INTERNAL); if (BuildConfig.DEBUG) { Log.d(TAG, "internal storage from API: " + mountPoint); } return mountPoint; } else { final MountPoint mountPoint = new MountPoint(externalStorage, MountPoint.StorageType.INTERNAL); if (BuildConfig.DEBUG) { Log.d(TAG, "internal storage from system environment: " + mountPoint); } return mountPoint; } }  @NonNull static MountPoint getInternalStorage(); @Nullable static MountPoint getExternalStorage(@NonNull final Context context,
                                                @Nullable String... storageStates); @NonNull static List<MountPoint> getMountPoints(@NonNull final Context context); static boolean isMounted(@NonNull final MountPoint mountPoint); @NonNull static String formatStorageSize(Context context,
                                           long storageSize); @NonNull static String formatStorageStatus(Context context,
                                             @NonNull final String status);  }
@Test public void testGetInternalStorage() { final MountPoint mountPoint = MountPointUtils.getInternalStorage(); assertNotNull(mountPoint); assertEquals(INTERNAL, mountPoint.getStorageType()); }