@Test
public void testGetCompositeRowWithSelectedColumns() throws IOException,
CruxException {
Report report = new Report();
Mapping mapping = new Mapping();
mapping.setTableName(TABLE_2);
RowAlias rAlias1 = new RowAlias();
rAlias1.setAlias("rowkeyLong");
rAlias1.setLength(8);
ValueType valueType1 = new ValueType();
valueType1.setClassName("java.lang.Long");
rAlias1.setValueType(valueType1);
//mapping.addRowAlias(rAlias1);
RowAlias rAlias2 = new RowAlias();
rAlias2.setAlias("rowkeyInt");
rAlias2.setLength(4);
ValueType valueType2 = new ValueType();
valueType2.setClassName("java.lang.Integer");
rAlias2.setValueType(valueType2);
//mapping.addRowAlias(rAlias2);
RowAlias rAlias3 = new RowAlias();
rAlias3.setAlias("rowkeyString");
rAlias3.setLength((int) Bytes.toBytes("I am a String" + 11).length);
ValueType valueType3 = new ValueType();
valueType3.setClassName("java.lang.String");
rAlias3.setValueType(valueType3);
//mapping.addRowAlias(rAlias3);
LinkedHashMap<String, RowAlias> rowAliases = new LinkedHashMap<String, RowAlias>();
rowAliases.put(rAlias1.getAlias(), rAlias1);
rowAliases.put(rAlias2.getAlias(), rAlias2);
rowAliases.put(rAlias3.getAlias(), rAlias3);
mapping.setRowAlias(rowAliases);
ColumnAlias cAlias = new ColumnAlias();
cAlias.setAlias("col");
cAlias.setColumnFamily("cf");
cAlias.setQualifier("qualifier");
cAlias.setValueType(valueType3);
mapping.addColumnAlias(cAlias);
ColumnAlias cAlias1 = new ColumnAlias();
cAlias1.setAlias("col1");
cAlias1.setColumnFamily("cf1");
cAlias1.setQualifier("qualifier");
cAlias1.setValueType(valueType1);
mapping.addColumnAlias(cAlias1);
ColumnAlias cAlias2 = new ColumnAlias();
cAlias2.setAlias("col1");
cAlias2.setColumnFamily("cf1");
cAlias2.setQualifier("qualifier1");
cAlias2.setValueType(valueType2);
mapping.addColumnAlias(cAlias2);
FilterType filter = new FilterType();
filter.setType("Equals");
RowAliasFilter rowFilter1 = new RowAliasFilter();