### Question:
MongoDBSchemaManager extends AbstractSchemaManager implements SchemaManager { public void dropSchema() { if (operation != null && operation.equalsIgnoreCase("create-drop")) { for (TableInfo tableInfo : tableInfos) { if (tableInfo.getLobColumnInfo().isEmpty()) { coll = db.getCollection(tableInfo.getTableName()); coll.drop(); KunderaCoreUtils.printQuery("Drop collection:" + tableInfo.getTableName(), showQuery); } else { coll = db.getCollection(tableInfo.getTableName() + MongoDBUtils.FILES); coll.drop(); KunderaCoreUtils.printQuery("Drop collection:" + tableInfo.getTableName() + MongoDBUtils.FILES, showQuery); coll = db.getCollection(tableInfo.getTableName() + MongoDBUtils.CHUNKS); coll.drop(); KunderaCoreUtils.printQuery("Drop collection:" + tableInfo.getTableName() + MongoDBUtils.CHUNKS, showQuery); } } } db = null; } MongoDBSchemaManager(String clientFactory, Map<String, Object> externalProperties,
            final KunderaMetadata kunderaMetadata); @Override /** * Export schema handles the handleOperation method. */ void exportSchema(final String persistenceUnit, List<TableInfo> schemas); void dropSchema(); @Override boolean validateEntity(Class clazz);  }### Answer:
@Test public void testDropSchema() { emf = Persistence.createEntityManagerFactory(persistenceUnit); em = emf.createEntityManager(); getDB(); MongoDBClientFactory clientFactory = (MongoDBClientFactory) ClientResolver.getClientFactory(persistenceUnit); clientFactory.getSchemaManager(null).dropSchema(); DBCollection collection = db.getCollection("MongoDBEntitySimple"); Assert.assertTrue(collection.getIndexInfo().isEmpty()); Assert.assertEquals(0, collection.getCount()); collection = db.getCollection("GFS_BOOK.files"); Assert.assertTrue(collection.getIndexInfo().isEmpty()); Assert.assertEquals(0, collection.getCount()); collection = db.getCollection("GFS_BOOK.chunks"); Assert.assertTrue(collection.getIndexInfo().isEmpty()); Assert.assertEquals(0, collection.getCount()); }