@Test
public void testGetNestedFieldsForMultipleItems() throws Exception {

	Product product1 = _toProduct(1L, null);
	Product product2 = _toProduct(2L, null);
	Mockito.when(
		_writerInterceptorContext.getEntity()
	).thenReturn(
		Arrays.asList(product1, product2)
	);
	Mockito.doReturn(
		new NestedFieldsHttpServletRequestWrapperTest.
			MockHttpServletRequest()
	).when(
		_nestedFieldServiceTrackerCustomizer
	).getHttpServletRequest(
		Mockito.any(Message.class)
	);
	NestedFieldsContextThreadLocal.setNestedFieldsContext(
		new NestedFieldsContext(
			Arrays.asList("productOptions", "skus"), new MessageImpl(),
			new MultivaluedHashMap<>(), "v1.0",
			new MultivaluedHashMap<>()));
	_nestedFieldsWriterInterceptor.aroundWriteTo(_writerInterceptorContext);
	Sku[] skus = product1.getSkus();
	Assert.assertEquals(Arrays.toString(skus), 4, skus.length);
	ProductOption[] productOptions = product1.getProductOptions();
	Assert.assertEquals(
		Arrays.toString(productOptions), 3, productOptions.length);
}