Adds key value integration tests

This PR primarily adds KV integration tests, but also fixes some parts of the existing KV integration

For tests this PR adds a reset method for the container
We must not patch core ...

Lets instead add the method to DB as BC, or subclass to replace this method.