title: How to write test for Resolve
body: <p>I want to write test for my service ,
   I want to sure parameter is send ok .how can i test that</p>
  
  <pre><code>import { Injectable } from '@angular/core';
  import { Resolve, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
  import { JhiPaginationUtil } from '.';
  
  @Injectable()
  export class JhiResolvePagingParams implements Resolve&lt;any&gt; {
  
      constructor(private paginationUtil: JhiPaginationUtil) { }
  
      resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {
          const page = route.queryParams['page'] ? route.queryParams['page'] : '1';
          const defaultSort = route.data['defaultSort'] ? route.data['defaultSort'] : 'id,asc';
          const sort = route.queryParams['sort'] ? route.queryParams['sort'] : defaultSort;
          return {
              page: this.paginationUtil.parsePage(page),
              predicate: this.paginationUtil.parsePredicate(sort),
              ascending: this.paginationUtil.parseAscending(sort)
          };
      }
  }
  </code></pre>