@SuppressWarnings("rawtypes")
public void testDataGrouping() {
//[1][-][3] --> [1][x][3]
//[1][2][3] --> [-][2][3]
//[-][2][3] -->
GroupedCellValue gcv;
CellValue< ? extends Comparable< ? >> cv = data.get( 0 ).get( 0 );
data.setMerged( true );
data.applyModelGrouping( cv );
assertEquals( data.size(),
2 );
cv = data.get( 0 ).get( 0 );
assertTrue( cv instanceof GroupedCellValue );
gcv = (GroupedCellValue) cv;
assertFalse( gcv.hasMultipleValues() );
assertEquals( cv.getValue(),
"1" );
cv = data.get( 0 ).get( 1 );
assertTrue( cv instanceof GroupedCellValue );
gcv = (GroupedCellValue) cv;
assertTrue( gcv.hasMultipleValues() );
cv = data.get( 0 ).get( 2 );
assertTrue( cv instanceof GroupedCellValue );
gcv = (GroupedCellValue) cv;
assertFalse( gcv.hasMultipleValues() );
assertEquals( cv.getValue(),
"3" );
cv = data.get( 1 ).get( 0 );
assertFalse( cv instanceof GroupedCellValue );