Improve existing unit tests and add Trash e2e tests