function hasLifecycleHook(hook: Hooks, directive: any): boolean {
  return hasLifecycleHookImpl(new JitReflector(), hook, directive);
}
 it('should be false otherwise', () => {
   expect(hasLifecycleHook(LifecycleHooks.AfterViewInit, DirectiveNoHooks)).toBe(false);
 });
 it('should be true when the directive has the ngAfterViewChecked method', () => {
   expect(hasLifecycleHook(
              LifecycleHooks.AfterViewChecked, DirectiveWithAfterViewCheckedMethod))
       .toBe(true);
 });
 it('should be true when the directive has the ngAfterContentInit method', () => {
   expect(hasLifecycleHook(
              LifecycleHooks.AfterContentInit, DirectiveWithAfterContentInitMethod))
       .toBe(true);
 });
 it('should be false otherwise', () => {
   expect(hasLifecycleHook(LifecycleHooks.AfterContentChecked, DirectiveNoHooks))
       .toBe(false);
 });
 it('should be true when the directive has the ngDoCheck method', () => {
   expect(hasLifecycleHook(LifecycleHooks.DoCheck, DirectiveWithOnCheckMethod)).toBe(true);
 });
 it('should be false otherwise', () => {
   expect(hasLifecycleHook(LifecycleHooks.DoCheck, DirectiveNoHooks)).toBe(false);
 });
 it('should be true when the directive has the ngOnChanges method', () => {
   expect(hasLifecycleHook(LifecycleHooks.OnChanges, DirectiveWithOnChangesMethod))
       .toBe(true);
 });
 it('should be true when the directive has the ngOnDestroy method', () => {
   expect(hasLifecycleHook(LifecycleHooks.OnDestroy, DirectiveWithOnDestroyMethod))
       .toBe(true);
 });
 () => { expect(hasLifecycleHook(Hooks.AfterViewInit, DirectiveNoHooks)).toBe(false); });