Hive hive = Hive.create(getConnectString(H2TestCase.TEST_DB), partitionDimensionName(), Types.INTEGER, CachingDataSourceProvider.getInstance(), null);
dimension = createPopulatedPartitionDimension();
dimension.setId(hive.getPartitionDimension().getId());
hive.setPartitionDimension(dimension);
resource = Atom.getFirstOrThrow(dimension.getResources());
hive.addResource(resource);
numIndex = resource.getSecondaryIndex("num");
nameIndex = resource.getSecondaryIndex("name");
for (SecondaryIndex secondaryIndex : resource.getSecondaryIndexes()) {
hive.addSecondaryIndex(resource, secondaryIndex);
}