added tests for diff generation and reverting