import org.kiji.schema.layout.impl.HTableSchemaTranslator;
public class TestHTableSchemaTranslator {
@Test
public void testTranslate() throws Exception {
final HTableSchemaTranslator translator = new HTableSchemaTranslator();
final KijiTableLayout tableLayout =
KijiTableLayout.newLayout(KijiTableLayouts.getLayout(KijiTableLayouts.FULL_FEATURED));
final KijiURI tableURI =
KijiURI
.newBuilder()
.withInstanceName("myinstance")
.withTableName(tableLayout.getName()).build();
final HTableDescriptor tableDescriptor =
translator.toHTableDescriptor(tableURI.getInstance(), tableLayout);
assertEquals("kiji.myinstance.table.user", tableDescriptor.getNameAsString());
assertEquals(2, tableDescriptor.getColumnFamilies().length);
assertFalse(tableDescriptor.getFamily(Bytes.toBytes("B")).isInMemory());