FileStoreImpl implements FileStore { boolean isExternalStorageAvailable() { final String state = Environment.getExternalStorageState(); if (!Environment.MEDIA_MOUNTED.equals(state)) { Twitter.getLogger().w(Twitter.TAG, "External Storage is not mounted and/or writable\n" + "Have you declared android.permission.WRITE_EXTERNAL_STORAGE " + "in the manifest?"); return false; } return true; } FileStoreImpl(Context context); @Override File getCacheDir(); @Override File getExternalCacheDir(); @Override File getFilesDir(); @Override File getExternalFilesDir();  }
@Test public void testisExternalStorageAvailable() { final String state = Environment.getExternalStorageState(); assertEquals(Environment.MEDIA_MOUNTED.equals(state), fileStore.isExternalStorageAvailable()); }