Added tests for rebase cases