Fix tests. Generalize moce service manager.