Fixes broken tests and add a service_ensure test.