@Override
  public Object invoke( Object proxy, Method method, Object[] args ) throws Throwable {
    try {
      return method.invoke( repositoryService, args );
    } catch ( InvocationTargetException ex ) {
      return sessionTimeoutHandler.handle( repositoryService, ex.getCause(), method, args );
    }
  }
@SuppressWarnings( "unchecked" )
  @Test
  public void testHandlerCallOnException() throws Throwable {
    when( repositoryService.getUsers() ).thenThrow( KettleRepositoryLostException.class );
    Method method = RepositorySecurityManager.class.getMethod( "getUsers" );

    metaStoresessionTimeoutHandler.invoke( mock( Proxy.class ), method, new Object[0] );
    verify( sessionTimeoutHandler ).handle( any(), any(), any(), any() );
  }