[SOUND] Previously we created manually a Mock Object without any help from Angular. However, there's another way for us to create services, factories etc, and that is by using the provide service. We are used to creating services, factories, directives with the service factory directives methods that were executed directly on the angular module instance. In reality however, those methods were just shortcut methods for the real API that creates those things for us. That API is to provide service. Here you could see that we're injecting the provide service using the angular.mod.module or simply the module function. Think of the module function as the .config function we injected providers into previously. Just like the .config method, you cannot inject nonprovider artifacts like a real service using the module method. For that, you have to use a separate Angular.mod.inject, or simply the inject method. We'll see that in just a second. Here, we use the provide service to define a service called MockService for our module. As you could see, we're defining it right in line. Once the service is defined, we can use its declared string name, MockService, as something we can inject into other calls. Also, in such a setup, we're not using a local variable to store the newly created service reference, so we could share it with a code that creates our controller. We simply don't need to. Since we need this Mock Service as part of our module now, we can have angular look for it later and inject it where it's needed. The next step is to use the mock inject method to inject our newly created MockService, and then use it in extenuating our controller. Note that depending upon what it is that you're trying to test, you may not want to create the controller in the central place like beforeEach. There's nothing wrong with creating the controller directly in the test itself. It all depends on what is the common starting state between the tests you're running. It's a good idea to take out of the tests whatever it is that's common between them, that way you're not writing the same code in multiple places. Okay, all that's left now is to create the test and it's exactly the same code as before. So let's go back to the code editor and go over the version two of the unit test we've done before.