So I am writing an API client for some third-party service. I get a response as JSON. now I am getting 100 fields as JSON responses but am consuming only 3 of those columns. I am using strict parsing using JSON.deserialize and deserializing all those 100 fields into apex class member variables for future-proofing it.
Now while writing test classes I need to cover them. Is there Describe Fields equivalent for apex class that I can use to cover those unused columns in test class? It seems quite hectic to just copy-paste 100 lines just to show class variable is being used. I don't wanna use JSON.derializeUntyped as it's not strict parsing which I need. What is the best way to increase coverage for those unused JSON columns for now?
JSON2ApexClass:
public class ResponseWrapper{
@AuraEnabled public Balances balances { get; set; } //Used
@AuraEnabled public Boolean allowOffset { get; set; } //Used
@AuraEnabled public Decimal arrearsTolerancePeriod { get; set; } //Not Used
@AuraEnabled public Decimal accruedPenalty { get; set; } //NotUsed
.
.
//100 such fields
}