title: How to mock typeORM repository
body: <p>I would like to write some tests and mock the typeORM repository.
   Tried few things but coudn't resolve it... (like the .. @InjectRepository)... Any thoughts?</p>
  
  <pre><code>import { AfterRoutesInit, Service } from '@tsed/common';
  import { TypeORMService } from '@tsed/typeorm';
  import { Connection, Repository } from 'typeorm';
  import { DbAccount } from '../entity/DbAccount';
  import { DbAddress } from '../entity/DbAddress';
  import { Account } from '../models/Account';
  import { Address } from '../models/address';
  import { Pageable } from '../models/api_common/Pageable';
  
  @Service()
  export default class AccountService implements AfterRoutesInit {
      private repository: Repository&lt;DbAccount&gt;;
      private addressRepository: Repository&lt;DbAddress&gt;;
  
      constructor(private typeORMService: TypeORMService) { }
  
      $afterRoutesInit(): void | Promise&lt;any&gt; {
          const connection: Connection = this.typeORMService.get('default');
          this.repository = connection.getRepository(DbAccount);
          this.addressRepository = connection.getRepository(DbAddress);
      }
  
      async delete(accountId: string): Promise&lt;void&gt; {
          await this.repository.delete(accountId);
  
          return;
      }
  
  }
  </code></pre>