Method indexMutator = ReflectionUtils.findMethod(UIRepeat.class, "setIndex", new Class[] { FacesContext.class,
int.class });
indexMutator.setAccessible(true);
ReflectionUtils.invokeMethod(indexMutator, uiRepeat, new Object[] { new MockFacesContext(), 1 });
ActionEvent event = new ActionEvent(commandButton);
this.selectionTrackingListener.processAction(event);
assertTrue(this.dataModel.isCurrentRowSelected());
assertSame(this.dataModel.getSelectedRow(), this.dataModel.getRowData());
assertTrue(this.delegateListener.processedEvent);
ReflectionUtils.invokeMethod(indexMutator, uiRepeat, new Object[] { new MockFacesContext(), 2 });
assertFalse(this.dataModel.isCurrentRowSelected());
assertTrue(this.dataModel.getSelectedRow() != this.dataModel.getRowData());
}