Added tests and functionality for getChanges method.