@Test
public void testMapToResults() throws Exception {

	Results<Individual> results = _individualJSONObjectMapper.mapToResults(
		_read("get-individuals.json"));
	Assert.assertEquals(2, results.getTotal());
	List<Individual> individuals = results.getItems();
	Individual individual = individuals.get(0);
	Assert.assertEquals("337338657439093764", individual.getId());
	List<Individual.DataSourceIndividualPK> dataSourceIndividualPKs =
		individual.getDataSourceIndividualPKs();
	Assert.assertEquals(
		dataSourceIndividualPKs.toString(), 8,
		dataSourceIndividualPKs.size());
	Individual.DataSourceIndividualPK dataSourceIndividualPK =
		dataSourceIndividualPKs.get(0);
	Assert.assertEquals(
		"335470356976861111", dataSourceIndividualPK.getDataSourceId());
	Assert.assertEquals(
		"LIFERAY", dataSourceIndividualPK.getDataSourceType());
	List<String> individualPKs = dataSourceIndividualPK.getIndividualPKs();
	Assert.assertEquals(individualPKs.toString(), 13, individualPKs.size());
	Assert.assertTrue(
		individualPKs.contains("bd537758-b907-f00f-91c2-b18dd46e3b32"));
	List<String> individualSegmentIds =
		individual.getIndividualSegmentIds();
	Assert.assertEquals(
		individualSegmentIds.toString(), 3, individualSegmentIds.size());
	Assert.assertEquals("335470926072595570", individualSegmentIds.get(0));
}