### Question:
RetryingHMSHandler implements InvocationHandler { private RetryingHMSHandler(Configuration origConf, IHMSHandler baseHandler, boolean local) throws MetaException { this.origConf = origConf; this.baseHandler = baseHandler; if (local) { baseHandler.setConf(origConf); } activeConf = baseHandler.getConf(); MetaStoreInit.updateConnectionURL(origConf, getActiveConf(), null, metaStoreInitData); try { invoke(baseHandler, baseHandler.getClass().getDeclaredMethod("init", (Class<?>[]) null), null); } catch (Throwable e) { LOG.error("HMSHandler Fatal error: " + ExceptionUtils.getStackTrace(e)); MetaException me = new MetaException(e.getMessage()); me.initCause(e); throw me; } } private  RetryingHMSHandler(Configuration origConf, IHMSHandler baseHandler, boolean local); static IHMSHandler getProxy(Configuration conf, IHMSHandler baseHandler, boolean local); @Override Object invoke(final Object proxy, final Method method, final Object[] args); Result invokeInternal(final Object proxy, final Method method, final Object[] args); Configuration getActiveConf();  }### Answer:
@Test public void testRetryingHMSHandler() throws Exception { String dbName = "hive4159"; String tblName = "tmptbl"; new DatabaseBuilder() .setName(dbName) .create(msc, conf); Assert.assertEquals(2, AlternateFailurePreListener.getCallCount()); new TableBuilder() .setDbName(dbName) .setTableName(tblName) .addCol("c1", ColumnType.STRING_TYPE_NAME) .create(msc, conf); Assert.assertEquals(4, AlternateFailurePreListener.getCallCount()); }