### Question:
RepositorySessionTimeoutHandler implements InvocationHandler { static IMetaStore wrapMetastoreWithTimeoutHandler( IMetaStore metaStore, SessionTimeoutHandler sessionTimeoutHandler ) { MetaStoreSessionTimeoutHandler metaStoreSessionTimeoutHandler = new MetaStoreSessionTimeoutHandler( metaStore, sessionTimeoutHandler ); return wrapObjectWithTimeoutHandler( metaStore, metaStoreSessionTimeoutHandler ); } RepositorySessionTimeoutHandler( ReconnectableRepository repository,
      RepositoryConnectController repositoryConnectController ); @SuppressWarnings( "unchecked" ) @Override Object invoke( Object proxy, Method method, Object[] args );  }### Answer:
@Test public void wrapMetastoreWithTimeoutHandler() throws Throwable { IMetaStore metaStore = mock( IMetaStore.class ); doThrow( KettleRepositoryLostException.class ).when( metaStore ).createNamespace( any() ); SessionTimeoutHandler sessionTimeoutHandler = mock( SessionTimeoutHandler.class ); IMetaStore wrappedMetaStore = RepositorySessionTimeoutHandler.wrapMetastoreWithTimeoutHandler( metaStore, sessionTimeoutHandler ); wrappedMetaStore.createNamespace( "TEST_NAMESPACE" ); verify( sessionTimeoutHandler ).handle( any(), any(), any(), any() ); }