}
@Test
public void shouldFireRowSelectionEvent() throws Exception {
// Select single row
nattable.doCommand(new SelectRowsCommand(nattable, 5, 5, NO_SHIFT,
NO_CTRL));
assertEquals(1, listener.getEventsCount());
assertTrue(listener.containsInstanceOf(RowSelectionEvent.class));
RowSelectionEvent event = (RowSelectionEvent) listener
.getReceivedEvents().get(0);
assertEquals(5, event.getRowPositionRanges().iterator().next().start);
assertEquals(6, event.getRowPositionRanges().iterator().next().end);
// Select additional rows with shift
nattable.doCommand(new SelectRowsCommand(nattable, 5, 7, WITH_SHIFT,
NO_CTRL));
assertEquals(2, listener.getEventsCount());
assertTrue(listener.containsInstanceOf(RowSelectionEvent.class));
event = (RowSelectionEvent) listener.getReceivedEvents().get(1);