Add consolidation functions unit tests