I have a class that processes some data returned by a query. The query is based on the createddate column of the object. In this case, the query specifically retrieves data created 3 days before today.
So as an example, the query would have the
Select Id, Name, Amount__c FROM MyCustomObject__C WHERE CreatedDate = TODAY - 3
as the condition to fetch records.
In my test class any records I insert in the MyCustomeOBject__c
would always have the CreatedDate = TODAY
So how can I make test data that was created 3 days ago?