Add StaticOptionalService (useful for unit tests).