code: public static org.robolectric.android.AttributeSetBuilder buildAttributeSet() {
      if (useLegacy()) {
        return new AttributeSetBuilderImpl(
            new LegacyResourceResolver(RuntimeEnvironment.application,
                RuntimeEnvironment.getCompileTimeResourceTable())) {};
      } else {
        return new AttributeSetBuilderImpl(
            new ArscResourceResolver(RuntimeEnvironment.application)) {};
      }
    }
docs: Allows for the programmatic creation of an {@link AttributeSet}.
  
  Useful for testing {@link View} classes without the need for creating XML snippets.