@Test
public void getProducts() {

	mockServer.expect(requestTo((CompanyTemplate.PRODUCTS_URL + "&oauth2_access_token=ACCESS_TOKEN")
		.replaceFirst("\\{id\\}", "1337")
		.replaceFirst("\\{start\\}", "0")
		.replaceFirst("\\{count\\}", "5"))).andExpect(method(GET))
		.andRespond(withSuccess(new ClassPathResource("products.json", getClass()), MediaType.APPLICATION_JSON));
	Products productResult = linkedIn.companyOperations().getProducts(1337, 0, 5);
	
	assertEquals(5, productResult.getCount());
	assertEquals(0, productResult.getStart());
	assertEquals(29, productResult.getTotal());
	assertEquals(5, productResult.getProducts().size());
	
	Product p = productResult.getProducts().get(0);
	assertEquals(new Date(1288188851297l), p.getCreationTimestamp());
	assertEquals("LinkedIn Content Ads offer marketers the opportunity to distribute multiple streams of dynamic, robust content in a single ad unit. From video and blogs to Twitter and RSS feeds, these unique ad units can be targeted to a unique segment of LinkedIn professionals through our enhanced targeting capabilities. Easy to execute and available in standard 300x250 and 160x600 media sizes, content ads require minimal maintenance. Marketers can build loyal followers by exposing LinkedIn members to the full spectrum of your most valuable content.Key Features include:", p.getDescription());
	assertEquals(4, p.getFeatures().size());
	assertEquals("Engaging user experience", p.getFeatures().get(0));
	assertEquals(1353, p.getId());
	assertEquals("https://media.linkedin.com/mpr/mpr/p/1/000/07b/03f/2165a65.jpg", p.getLogoUrl());
	assertEquals("LinkedIn Content Ads", p.getName());
	assertEquals(3, p.getNumRecommendations());
	assertEquals("INT", p.getProductCategory().getCode());
	assertEquals("Internet", p.getProductCategory().getName());
	assertEquals(3, p.getRecommendations().size());
	assertEquals(160209, p.getRecommendations().get(0).getId());
	assertEquals(1353, p.getRecommendations().get(0).getProductId());
	assertEquals("CSUN", p.getRecommendations().get(0).getRecommender().getFirstName());
	assertEquals("4vmInU1H4C", p.getRecommendations().get(0).getRecommender().getId());
	assertEquals("C.", p.getRecommendations().get(0).getRecommender().getLastName());
	assertEquals("Please \"like\" our College Facebook ( https://www.facebook.com/pages/CSU-Northridge-College-of-Business-and-Economics/178294905565227 ), \"follow\" us on Tumblr ( https://cobaecsun.tumblr.com ), and \"follow\" us on Twitter ( https://twitter.com/cobaecsun ).", p.getRecommendations().get(0).getText());
	assertEquals(new Date(1319639274411l), p.getRecommendations().get(0).getTimestamp());
}