title: Simple Injector, can't override existing registration
body: <p>I am currently using Simple Injector for the first time. In my .NET project I am running test and mocking data returned from a web service and registering the object to the container like so </p>
  
  <pre><code> _container.Register&lt;IWebServiceOrder&gt;(() =&gt; mock.Object, Lifestyle.Transient);
  </code></pre>
  
  <p>This works fine. But in my tests I want to test the behavior of the system on a second call to the web service that will contain updated data, so the mock object will need to be updated.</p>
  
  <p>By default Simple Injector does not allow Overriding existing registrations but the official website states it is possible to change this behavior like below. </p>
  
  <p><a href="https://simpleinjector.readthedocs.org/en/latest/howto.html#override-existing-registrations" rel="nofollow">https://simpleinjector.readthedocs.org/en/latest/howto.html#override-existing-registrations</a> </p>
  
  <pre><code>container.Options.AllowOverridingRegistrations = true;
  </code></pre>
  
  <p>Unfortunately i still get an error when i try to register the object a second time even with the above code.</p>
  
  <blockquote>
    <p>The container can't be changed after the first call to GetInstance, GetAllInstances and Verify</p>
  </blockquote>
  
  <p>Any ideas on why this is happening?</p>