Util class with isSorted API along with unit test