@Test
public void testGetNestedFieldsWithPagination() throws Exception {

	Product product = _toProduct(1L, null);
	Mockito.when(
		_writerInterceptorContext.getEntity()
	).thenReturn(
		product
	);
	Mockito.doReturn(
		new NestedFieldsHttpServletRequestWrapperTest.
			MockHttpServletRequest(
				"skus", "page", String.valueOf(1), "pageSize",
				String.valueOf(2))
	).when(
		_nestedFieldServiceTrackerCustomizer
	).getHttpServletRequest(
		Mockito.any(Message.class)
	);
	NestedFieldsContextThreadLocal.setNestedFieldsContext(
		new NestedFieldsContext(
			Collections.singletonList("skus"), new MessageImpl(),
			_getPathParameters(), "v1.0", new MultivaluedHashMap<>()));
	_nestedFieldsWriterInterceptor.aroundWriteTo(_writerInterceptorContext);
	Sku[] skus = product.getSkus();
	Assert.assertEquals(Arrays.toString(skus), 2, skus.length);
}