package com.xtremelabs.robolectric.shadows;

import android.os.Environment;
import com.xtremelabs.robolectric.internal.Implementation;
import com.xtremelabs.robolectric.internal.Implements;

@Implements(Environment.class)
public class ShadowEnvironment {

    private static final String MEDIA_REMOVED = "removed";

    private static String externalStorageState = MEDIA_REMOVED;

    @Implementation
    public static String getExternalStorageState() {
        return externalStorageState;
    }

    public static void setExternalStorageState(String externalStorageState) {
        ShadowEnvironment.externalStorageState = externalStorageState;
    }
}

@@ -38,16 +38,38 @@
 adows;%0A%0A
+import java.io.File;%0A%0A
 import a
@@ -668,10 +668,144 @@
 ;%0A    %7D%0A
+    %0A    @Implementation%0A    public static File getExternalStorageDirectory() %7B%0A%09%09return ShadowContext.EXTERNAL_CACHE_DIR;%0A    %7D%0A    %0A
 %7D%0A

Support external storage folder