robolectric/src/main/java/org/robolectric/ConfigMerger.java
public Config getConfig(Class<?> testClass, Method method, Config globalConfig) {
    Config config = Config.Builder.defaults().build();
    config = override(config, globalConfig);

    for (String packageName : reverse(packageHierarchyOf(testClass))) {
      Config packageConfig = cachedPackageConfig(packageName);
      config = override(config, packageConfig);
    }

    for (Class clazz : reverse(parentClassesFor(testClass))) {
      Config classConfig = (Config) clazz.getAnnotation(Config.class);
      config = override(config, classConfig);
    }

    Config methodConfig = method.getAnnotation(Config.class);
    config = override(config, methodConfig);

    return config;
  }
public Config getConfig(Class<?> testClass, Method method, Config globalConfig) {
    Config config = Config.Builder.defaults().build();
    config = override(config, globalConfig);

    for (String packageName : reverse(packageHierarchyOf(testClass))) {
      Config packageConfig = cachedPackageConfig(packageName);
      config = override(config, packageConfig);
    }

    for (Class clazz : reverse(parentClassesFor(testClass))) {
      Config classConfig = (Config) clazz.getAnnotation(Config.class);
      config = override(config, classConfig);
    }

    Config methodConfig = method.getAnnotation(Config.class);
    config = override(config, methodConfig);

    return config;
  }
public Config getConfig ( Class < ? > testClass , Method method , Config globalConfig ) { Config config = Config . Builder . defaults ( ) . build ( ) ; config = override ( config , globalConfig ) ; for ( String packageName : reverse ( packageHierarchyOf ( testClass ) ) ) { Config packageConfig = cachedPackageConfig ( packageName ) ; config = override ( config , packageConfig ) ; } for ( Class clazz : reverse ( parentClassesFor ( testClass ) ) ) { Config classConfig = ( Config ) clazz . getAnnotation ( Config . class ) ; config = override ( config , classConfig ) ; } Config methodConfig = method . getAnnotation ( Config . class ) ; config = override ( config , methodConfig ) ; return config ; }
Calculate the {@link Config} for the given test.

@param testClass the class containing the test
@param method the test method
@param globalConfig global configuration values
@return the effective configuration
@since 3.2
Calculate the { @link Config } for the given test .