Add code coverage and integration tests