### Question:
CommonsMetadataEngine implements IMetadataEngine { @Override public final void createTable(ClusterName targetCluster, TableMetadata tableMetadata) throws UnsupportedException, ExecutionException { try { connectionHandler.startJob(targetCluster.getName()); if (logger.isDebugEnabled()) { logger.debug("Creating table [" + tableMetadata.getName().getName() + "] in cluster [" + targetCluster .getName() + "]"); } createTable(tableMetadata, connectionHandler.getConnection(targetCluster.getName())); if (logger.isDebugEnabled()) { logger.debug( "Catalog [" + tableMetadata.getName().getName() + "] has been created successfully in cluster [" + targetCluster.getName() + "]"); } } finally { connectionHandler.endJob(targetCluster.getName()); } } protected  CommonsMetadataEngine(ConnectionHandler connectionHandler); @Override final void createCatalog(ClusterName targetCluster, CatalogMetadata catalogMetadata); @Override final void createTable(ClusterName targetCluster, TableMetadata tableMetadata); @Override final void dropCatalog(ClusterName targetCluster, CatalogName name); @Override final void dropTable(ClusterName targetCluster, TableName name); @Override final void createIndex(ClusterName targetCluster, IndexMetadata indexMetadata); @Override final void dropIndex(ClusterName targetCluster, IndexMetadata indexMetadata); @Override final void alterTable(ClusterName targetCluster, TableName name, AlterOptions alterOptions); @Override final void alterCatalog(ClusterName targetCluster, CatalogName catalogName, Map<Selector, Selector> options); @Override final List<CatalogMetadata> provideMetadata(ClusterName targetCluster); @Override final CatalogMetadata provideCatalogMetadata(ClusterName targetCluster, CatalogName catalogName); @Override final TableMetadata provideTableMetadata(ClusterName targetCluster, TableName tableName);  }### Answer:
@Test public void createTablegTest() throws ExecutionException, UnsupportedException, NoSuchFieldException { CommonsMetadataEngine cME = mock(CommonsMetadataEngine.class); Whitebox.setInternalState(cME, "connectionHandler", connectionHandlerTEst); Whitebox.setInternalState(cME, "logger", LoggerFactory.getLogger(this.getClass())); ClusterName clusterName = new ClusterName(CLUSTER_NAME); cME.createTable(clusterName, genericTableMetadata); InOrder order = inOrder(connectionHandlerTEst,cME); order.verify(connectionHandlerTEst).startJob(CLUSTER_NAME); order.verify(cME).createTable(genericTableMetadata, genericConnection); order.verify(connectionHandlerTEst).endJob(CLUSTER_NAME); }