Export DiffFromLast for tests
Add tests for DiffFromLast