StoreFactory { public Store createStore(String tableName) { try { return storeProviders.get(AdapterType.valueOf(databaseName(tableName).toUpperCase())).get(); } catch (IllegalArgumentException e) { return storeProviders.get(configuration.getDefaultAdapter()).get(); } } @Inject  StoreFactory(Map<AdapterType, Provider<Store>> storeMap,
                        HoneycombConfiguration configuration); Store createStore(String tableName);  }
@Test public void testDefaultTablespaceIsUsed() { StoreFactory factory = createFactory(); Store returnedStore = factory.createStore(tableName); assertEquals(returnedStore, this.store); }