Page page = mock(Page.class);
given(page.getContent()).willReturn(Collections.singletonList("a"));
given(page.getTotalElements()).willReturn(100L);
this.uiPagedData.setValueExpression("value", mockExpression(page));
this.uiPagedData.encodeEnd(this.context);
PagedDataRows rows = (PagedDataRows) this.requestMap.get("pagedData");
rows.setRowIndex(0);
assertThat(rows.getRowData(), is(equalTo((Object) "a")));
assertThat(rows.getRowCount(), is(equalTo(100)));
assertThat(this.pageRequest, is(notNullValue()));
assertThat(this.pageRequest, is(Pageable.class));
}