use of com.nearinfinity.honeycomb.MockHTable in project honeycomb by altamiracorp.
the class MutationFactoryTest method testSetup.
@Before
public void testSetup() {
HBaseTableFactory tableFactory = mock(HBaseTableFactory.class);
HTableProvider provider = mock(HTableProvider.class);
MockitoAnnotations.initMocks(this);
MockHTable table = MockHTable.create();
when(provider.get()).thenReturn(table);
HBaseMetadata metadata = new HBaseMetadata(provider);
metadata.setColumnFamily("nic");
MetadataCache cache = new MetadataCache(metadata);
HBaseStore store = new HBaseStore(metadata, tableFactory, cache);
factory = new MutationFactory(store);
factory.setColumnFamily("nic");
TableSchema schema = new TableSchema(COLUMNS, INDICES);
store.createTable(TABLE, schema);
tableId = store.getTableId(TABLE);
}
Aggregations