@Test
public void testCreateRequestControlWithTargetAsOffset() throws Exception {

	int pageSize = 5;
	int targetOffset = 25;
	int listSize = 1000;
	VirtualListViewControlDirContextProcessor tested = new VirtualListViewControlDirContextProcessor(
			pageSize, targetOffset, listSize,
			new VirtualListViewResultsCookie(new byte[0], 0, 0));
	VirtualListViewControl result = (VirtualListViewControl) tested
			.createRequestControl();
	assertThat(result).isNotNull();
	assertThat(result.getID()).isEqualTo(OID_REQUEST);
	// verify that the values have been encoded as we expect
	int expectedBeforeCount = 0;
	int expectedAfterCount = 4;
	int expectedOffset = 25;
	int expectedContentCount = listSize;
	assertEncodedRequest(result.getEncodedValue(), expectedBeforeCount,
			expectedAfterCount, expectedOffset, expectedContentCount,
			new byte[0]);
}