### Question:
EtcdMetaStore implements MetaStore { @Override public boolean storeCatalog(Metapb.CatalogInfo expect, Metapb.CatalogInfo catalogInfo) { return etcdClient.comparePut(String.format(DB_PATH, String.valueOf(catalogInfo.getId())), expect == null ? null : expect.toByteString(), catalogInfo.toByteString()); }  @Override void init(JimConfig c); @Override int allocMetaID(); @Override long allocTaskID(TaskType type); @Override long addAndGetVersion(long incr); @Override long addAndGetPrivVersion(long incr); @Override void register(long version); @Override void unRegister(); @Override Map<String, Long> getRegisters(); @Override boolean storeCatalog(Metapb.CatalogInfo expect, Metapb.CatalogInfo catalogInfo); @Override boolean removeCatalog(int id); @Override Metapb.CatalogInfo getCatalog(int id); @Override List<Metapb.CatalogInfo> getCatalogs(); @Override boolean storeTable(Metapb.TableInfo expect, Metapb.TableInfo tableInfo); @Override boolean removeTable(int dbID, int tableID); @Override Metapb.TableInfo getTable(int catalogID, int tableID); @Override List<Metapb.TableInfo> getTables(int catalogID); @Override Map<Metapb.CatalogInfo, List<Metapb.TableInfo>> getCatalogAndTables(); @Override Metapb.AutoIdInfo getAutoIdInfo(int catalogID, int tableID); @Override Metapb.AutoIdInfo storeAutoIdInfo(int catalogID, int tableID, Metapb.AutoIdInfo autoIdInfo, Metapb.AutoIdInfo expect); @Override boolean storeTask(TaskType type, Task expect, Task... tasks); @Override Task getTask(TaskType type, Task task); @Override List<Task> getTasks(TaskType type, Task task); @Override void removeTask(TaskType type, long taskId); @Override boolean tryLock(TaskType type, Task task); @Override void unLock(TaskType type, Task task); @Override void watch(WatchType type, LongConsumer consumer); @Override void close();  }### Answer:
@Test public void storeCatalog() { CatalogInfo.Builder builder = CatalogInfo.newBuilder(); int id = metaStore.allocMetaID(); builder.setId(id) .setName("test_" + id); metaStore.storeCatalog(null, builder.build()); CatalogInfo catalog1 = metaStore.getCatalog(id); Assert.assertEquals("test_" + id, catalog1.getName()); metaStore.removeCatalog(id); CatalogInfo catalog3 = metaStore.getCatalog(id); Assert.assertEquals(null, catalog3); }