refactor the Schedulable interface and add unit test for SchedulingAlgorithm