List<String> descriptionHits = new ArrayList<String>();
descriptionHits.add("foo");
hits.put("description", descriptionHits);
item = new FilteredContentProviderResultItem(id, modelElement, label, null, content, project, hits);
TestResultItemViewText text = new TestResultItemViewText(shell, SWT.NONE);
assertFalse(text.getStyledText().getEditable()); //must be non editable by default
text.setItemToDisplay(item);
StyleRange[] styleRanges = text.getStyledText().getStyleRanges();
assertEquals(10, styleRanges.length);
assertEquals(30, styleRanges[0].start );
assertEquals(3, styleRanges[0].length ); // foo
assertEquals(35, styleRanges[1].start );
assertEquals(11, styleRanges[1].length );
assertEquals(46, styleRanges[2].start );
assertEquals(11, styleRanges[2].length );
assertEquals(58, styleRanges[3].start );//foo
assertEquals(3, styleRanges[3].length );
assertEquals(62, styleRanges[4].start );//Foo
assertEquals(3, styleRanges[4].length );
assertEquals(66, styleRanges[5].start );//fOo
assertEquals(3, styleRanges[5].length );
assertEquals(70, styleRanges[6].start );//foO
assertEquals(3, styleRanges[6].length );
assertEquals(74, styleRanges[7].start );//FOo
assertEquals(3, styleRanges[7].length );
assertEquals(78, styleRanges[8].start );//FoO
assertEquals(3, styleRanges[8].length );
assertEquals(82, styleRanges[9].start );//fOO
assertEquals(3, styleRanges[9].length );
assertEquals(null, text.getStyledText().getLineBackground(0));
assertEquals(null, text.getStyledText().getLineBackground(1));
assertEquals(null, text.getStyledText().getLineBackground(2));
assertEquals(Display.getDefault().getSystemColor(SWT.COLOR_GRAY), text.getStyledText().getLineBackground(3));
assertEquals(null, text.getStyledText().getLineBackground(4));
}