reinstate code coverage and mocument tests