@Test
@DatabaseSetup(value = "classpath:dbunit/widgets_bundle.xml", type= DatabaseOperation.DELETE_ALL)
public void testFindSystemWidgetsBundles() {

    createSystemWidgetBundles(30, "WB_");
    assertEquals(30, widgetsBundleDao.find().size());
    // Get first page
    TextPageLink textPageLink1 = new TextPageLink(10, "WB");
    List<WidgetsBundle> widgetsBundles1 = widgetsBundleDao.findSystemWidgetsBundles(textPageLink1);
    assertEquals(10, widgetsBundles1.size());
    // Get next page
    TextPageLink textPageLink2 = new TextPageLink(10, "WB", widgetsBundles1.get(9).getId().getId(), null);
    List<WidgetsBundle> widgetsBundles2 = widgetsBundleDao.findSystemWidgetsBundles(textPageLink2);
    assertEquals(10, widgetsBundles2.size());
}