Angular test memo

0. spy should be set before TestBed.get
1. service should be instantiated in 'it' clause
2. TestBed can be used in beforeEach.

# Example
```typescript
describe('AuthService', () => {

    /* set spy of angularFireAuth */
    let angularFireAuthStub: AngularFireAuth;
    let userStub;
    /* stub of firebase user */
    const tokenString = 'token_string';

    let service: AuthService;
    let userStateStub;
    beforeEach(() => {
        userStub = {
            getIdToken(): Promise<string | null> {
                return Promise.resolve(tokenString);
            },
            get providerData() {
                return [ {
                    providerId: 'google.com'
                }, {
                    providerId: 'password',
                } ];
            },
            get emailVerified() {
                return false;
            }
        };
        userStateStub = new BehaviorSubject(userStub);
        angularFireAuthStub = {
            get authState(): Observable<any> {
                return userStateStub;
            },
            get idToken(): Observable<string | null> {
                return this.authState.pipe(flatMap((user: any) => {
                    if (user) {
                        return user.getIdToken();
                    } else {
                        return of(null);
                    }
                }));
            },
            auth: {
                signOut(): Promise<void> {
                    return Promise.resolve();
                }
            } as FirebaseAuth
        } as AngularFireAuth;
        TestBed.configureTestingModule({
            providers: [
                AuthService,
                {provide: AngularFireAuth, useValue: angularFireAuthStub}
            ]
        });
    });


    it('#authState should return observable of user', function (done) {
        service = TestBed.get(AuthService);
        const result = service.authState;
        expect(result).toBeInstanceOf(Observable);
        result.subscribe(user => {
            expect(user).toEqual(userStub as any);
            done();
        });
    });

    it('#getAuthState should close after called', function (done) {
        service = TestBed.get(AuthService);
        const result = service.getAuthState;
        expect(result).toBeInstanceOf(Observable);
        const subscription = result.subscribe();
        expect(subscription.closed).toBeTrue();
        done();
    });

    it('#getIdToken should return observable of idToken', function (done) {
        service = TestBed.get(AuthService);
        expect(service.getIdToken).toBeInstanceOf(Observable);
        service.getIdToken.subscribe(token => {
            expect(token).toEqual(tokenString);
            done();
        });
    });

    it('#getIdToken should return null when authState return null', function (done) {
        spyOnProperty(angularFireAuthStub, 'authState').and.returnValue(new BehaviorSubject(null));
        service = TestBed.get(AuthService);
        expect(service.getIdToken).toBeInstanceOf(Observable);
        service.getIdToken.subscribe(token => {
            expect(token).toBeNull();
            done();
        });
    });

    it('#isSignIn should return true', function (done) {
        service = TestBed.get(AuthService);
        service.isSignIn().subscribe(result => {
            expect(result).toBeTrue();
            done();
        });
    });

    it('#isSignIn should return false if angularFireAuth.authState return null', function (done) {
        spyOnProperty(angularFireAuthStub, 'authState').and.returnValue(new BehaviorSubject(null));
        service = TestBed.get(AuthService);
        service.isSignIn().subscribe(result => {
            expect(result).toBeFalse();
            done();
        });
    });

    it('# isSignIn fail if email not verified', function (done) {
        spyOnProperty(userStub, 'providerData').and.returnValue([ {
            providerId: 'password',
        } ]);
        spyOnProperty(userStub, 'emailVerified').and.returnValue(false);
        service = TestBed.get(AuthService);
        service.isSignIn().subscribe(result => {
            expect(result).toBeFalse();
            done();
        });
    });

    it('#signOut should call firebaseAuth.auth.signOut', async function () {
        spyOn(angularFireAuthStub.auth, 'signOut');
        service = TestBed.get(AuthService);
        await service.signOut();
        expect(angularFireAuthStub.auth.signOut).toHaveBeenCalled();
    });
});

```