Use the TestVisible annotation.
Here is what the above code is Doing:
1. The TestVisible annotation is used to mark the method as visible to the test.
2. The test method is annotated with the @isTest annotation.
3. The test method calls the method that is marked as visible to the test.