I'm having a hard time testing the if condition, really not sure where the if condition has been triggered or how to trigger it. Here is the method
validateCapturedDate(capturedAt) {
const currentDateTime = new Date()
if (capturedAt > currentDateTime) {
throw new Error(`"capturedAt" has value greater than current date`)
}
}