[FEATURE] Add and test getMostRecentlyClosedLedger.