package hdm.sampleproject.app;

import org.junit.runners.model.InitializationError;
import org.robolectric.AndroidManifest;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.annotation.Config;
import org.robolectric.res.Fs;

/**
 * @author Leon Schröder
 * RobolectricGradleTestRunner
 */
public class TestRunner extends RobolectricTestRunner {

    /**
     * Constructor
     * @param testClass
     * @throws InitializationError
     */
    public TestRunner(Class<?> testClass) throws InitializationError {
        super(testClass);
    }

    @Override
    protected AndroidManifest getAppManifest(Config config) {
        String manifestProperty = System.getProperty("android.manifest");
        if (config.manifest().equals(Config.DEFAULT) && manifestProperty != null) {
            String resProperty = System.getProperty("android.resources");
            String assetsProperty = System.getProperty("android.assets");
            return new AndroidManifest(Fs.fileFromPath(manifestProperty),
                    Fs.fileFromPath(resProperty), Fs.fileFromPath(assetsProperty));
        }
        return super.getAppManifest(config);
    }

}
@@ -408,16 +408,49 @@
 estClass
+ The class which should be tested
 %0A     * 
@@ -588,16 +588,207 @@
 ;%0A    %7D%0A
+    %0A    /**%0A     * Get the AndroidManifest of the application%0A     * @param  Config The configuration for the application%0A     * @return        The AndroidManifest of the application%0A     */
 %0A    @Ov
@@ -1383,8 +1383,9 @@
     %7D%0A%0A%7D
+%0A

Update TestRunner.java