@Override
    public Catalog createCatalog(Context context) {
        final FactoryUtil.CatalogFactoryHelper helper =
                FactoryUtil.createCatalogFactoryHelper(this, context);
        helper.validate();

        return new GenericInMemoryCatalog(
                context.getName(), helper.getOptions().get(DEFAULT_DATABASE));
    }
@Test
    void test() throws Exception {
        final String catalogName = "mycatalog";
        final String databaseName = "mydatabase";

        final GenericInMemoryCatalog expectedCatalog =
                new GenericInMemoryCatalog(catalogName, databaseName);

        final Map<String, String> options = new HashMap<>();
        options.put(
                CommonCatalogOptions.CATALOG_TYPE.key(),
                GenericInMemoryCatalogFactoryOptions.IDENTIFIER);
        options.put(GenericInMemoryCatalogFactoryOptions.DEFAULT_DATABASE.key(), databaseName);

        final Catalog actualCatalog =
                FactoryUtil.createCatalog(
                        catalogName, options, null, Thread.currentThread().getContextClassLoader());

        checkEquals(expectedCatalog, (GenericInMemoryCatalog) actualCatalog);
    }