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);
assertEquals(1, event.getRowPositionRanges().size());
assertEquals(5, event.getRowPositionRanges().iterator().next().start);
assertEquals(8, event.getRowPositionRanges().iterator().next().end);
}