title: NullInjectorError: StaticInjectorError[AviorBackendService]: NullInjectorError: No provider for even though the service is provided
body: <p>I have my test code here:</p>
  
  <pre><code>import { TestBed, inject } from '@angular/core/testing';
  
  import { AviorBackendService } from './avior-backend.service';
  import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
  
  describe('AviorBackendService', () =&gt; {
    beforeEach(() =&gt; TestBed.configureTestingModule({imports: [HttpClientTestingModule],
      providers: [ AviorBackendService ]}));
  
    it('should be created', () =&gt; {
      const service: AviorBackendService = TestBed.get(AviorBackendService);
      expect(service).toBeTruthy();
    });
  });
  
  it('expects service to fetch data with proper sorting', () =&gt; {
        const service: AviorBackendService = TestBed.get(AviorBackendService);
        // tslint:disable-next-line: prefer-const
        let httpMock: HttpTestingController;
        service.getUserCollection().subscribe(data =&gt; {
        expect(data.length).toBe(7);
        const req = httpMock.expectOne('http://localhost:3000/users');
        expect(req.request.method).toEqual('GET');      // Then we set the fake data to be returned by the mock
        req.flush({firstname: 'Chad'});
        });
      });
  
  it('should create the Preferences Service', inject([AviorBackendService], (service: AviorBackendService) =&gt; {
            expect(service).toBeTruthy();
          }));
  </code></pre>
  
  <p>As you can see the AviorBackendService is provided, but still the error gets thrown out for the second and third tests. How to solve this? I tried changing it to declarations but that gave me other new errors so it seems to be not a proper solution.</p>