@Test
public void testMultiIndexExpression() throws Exception {
MultiIndexExpression multiIndexExpression = new MultiIndexExpression(GroupingCondition.AND);
String index1 = "idx1";
SingleIndexExpression singleIndexExpression = new SingleIndexExpression(index1);
byte[] value2 = Bytes.toBytes(1234);
Column column = new Column(FAMILY1, QUALIFIER2);
EqualsExpression equalsExpression = new EqualsExpression(column, value2);
singleIndexExpression.addEqualsExpression(equalsExpression);
column = new Column(FAMILY1, QUALIFIER3);
byte[] value3_1 = Bytes.toBytes(10.4F);
byte[] value3_2 = Bytes.toBytes(16.91F);
RangeExpression re = new RangeExpression(column, value3_1, value3_2, true, false);
singleIndexExpression.setRangeExpression(re);
multiIndexExpression.addIndexExpression(singleIndexExpression);
MultiIndexExpression multiIndexExpression2 = new MultiIndexExpression(GroupingCondition.OR);
String index2 = "idx2";
singleIndexExpression = new SingleIndexExpression(index2);
byte[] value1 = Bytes.toBytes("asdf");
column = new Column(FAMILY1, QUALIFIER1);
equalsExpression = new EqualsExpression(column, value1);
singleIndexExpression.addEqualsExpression(equalsExpression);
multiIndexExpression2.addIndexExpression(singleIndexExpression);
String index3 = "idx3";
singleIndexExpression = new SingleIndexExpression(index3);
byte[] value4 = Bytes.toBytes(567.009D);
column = new Column(FAMILY2, QUALIFIER1);
equalsExpression = new EqualsExpression(column, value4);
singleIndexExpression.addEqualsExpression(equalsExpression);
multiIndexExpression2.addIndexExpression(singleIndexExpression);
multiIndexExpression.addIndexExpression(multiIndexExpression2);
Scan scan = new Scan();