Fix and extend unit- and integration-tests.