move some E2E tests to Unit tests