I am trying to build a test class for my new trigger and part of the trigger is to check current time against the org business hours then set it as a boolean yes/no.
Code:
DateTime now =system.Now();
BusinessHours bh = [SELECT Id FROM BusinessHours WHERE IsDefault=true];
Boolean isWithin= BusinessHours.isWithin(bh.id, now);
How would I write this as a test class to test if it is or is not within the org business hours?