Add test resource classes for flattening UTs.
Add `flattenClassMethod` for method flattening.