Correct flush issues.

Corrected issue when handling flush REST response.
Additionally removed the test as it is unreliable
due to not flush being async, in addition to not
fitting within the constraints of the new testing
setup.

Change-Id: I8da906d07869fc9d191cc3db9030999130b69150
WIP: CAVES integration.

Change-Id: Ib35ba24a36d10815c7d92e3cf0103dc9eaf9a47c