* @throws Exception
*/
@Test
public void testEmptyModelWithPageSize() throws Exception {
Object[] elements = new Object[0];
NewsBrowserViewModel model = new NewsBrowserViewModel(null);
model.setInput(elements, 5);
assertEquals(-1L, model.findGroup(5L));
assertEquals(-1L, model.getExpandedNews());
assertFalse(model.isFirstItemUnread());
assertTrue(model.getGroups().isEmpty());
assertEquals(0, model.getGroupSize(5L));
assertTrue(model.getNewsIds(5L).isEmpty());
assertFalse(model.hasGroup(5L));
assertFalse(model.hasNews(5L));
assertFalse(model.isNewsExpanded(fFactory.createNews(5L, fFactory.createFeed(null, URI.create("rssowl.org")), new Date())));
assertTrue(model.isGroupExpanded(5L));
assertEquals(-1L, model.nextNews(false, -1L));
assertEquals(-1L, model.previousNews(false, -1L));
assertEquals(-1L, model.nextNews(true, -1L));
assertEquals(-1L, model.previousNews(true, -1L));
assertEquals(-1L, model.nextNews(false, 5L));
assertEquals(-1L, model.previousNews(false, 5L));
assertEquals(-1L, model.nextNews(true, 5L));
assertEquals(-1L, model.previousNews(true, 5L));
assertEquals(-1L, model.removeNews(fFactory.createNews(5L, fFactory.createFeed(null, URI.create("rssowl.org")), new Date())));
assertTrue(model.getVisibleUnreadNews().isEmpty());
assertEquals(-1L, model.getLastNews());
assertEquals(0, model.getNewsCount());
assertEquals(0, model.getVisibleNewsCount());
Pair<List<Long>, List<Long>> nextPage = model.getNextPage(0);
assertTrue(nextPage.getFirst().isEmpty());
assertTrue(nextPage.getSecond().isEmpty());
nextPage = model.getNextPage(5);
assertTrue(nextPage.getFirst().isEmpty());
assertTrue(nextPage.getSecond().isEmpty());
Pair<List<Long>, List<Long>> revealed = model.revealPage(5L, 0);
assertTrue(revealed.getFirst().isEmpty());
assertTrue(revealed.getSecond().isEmpty());
model.setNewsExpanded(fFactory.createNews(5L, fFactory.createFeed(null, URI.create("rssowl.org")), new Date()), false);
model.setGroupExpanded(5L, false);
assertEquals(-1L, model.getLastVisibleNews());
assertFalse(model.hasHiddenNews());
}