This reverts commit d599fd3434. but keeps the integration test. The test is made green by the following commits.
d599fd3434