@Test public void test(final DrillbitContext bitContext) throws Exception { final DrillConfig c = DrillConfig.create(); new NonStrictExpectations() { { bitContext.getMetrics(); result = new MetricRegistry(); bitContext.getAllocator(); result = new TopLevelAllocator(); bitContext.getConfig(); result = c; bitContext.getCache(); result = new LocalCache(); } }; bitContext.getCache().run(); StoragePluginRegistry r = new StoragePluginRegistry(bitContext); SchemaPlus plus = Frameworks.createRootSchema(); r.init(); r.getSchemaFactory().registerSchemas(null, plus); printSchema(plus, 0); }