ItemSelectorCriterionSerializerImpl implements ItemSelectorCriterionSerializer { @Override public <T extends ItemSelectorCriterion> T deserialize( Class<T> itemSelectorCriterionClass, String json) { JSONDeserializer<T> jsonDeserializer = JSONFactoryUtil.createJSONDeserializer(); jsonDeserializer.transform( _desiredItemSelectorReturnTypesJSONDeserializerTransformer, "desiredItemSelectorReturnTypes"); return jsonDeserializer.deserialize(json, itemSelectorCriterionClass); }  @Override T deserialize(
		Class<T> itemSelectorCriterionClass, String json); @Override String serialize(ItemSelectorCriterion itemSelectorCriterion); @Reference(unbind = "-") void setItemSelectorViewReturnTypeProviderHandler(
		ItemSelectorViewReturnTypeProviderHandler
			itemSelectorViewReturnTypeProviderHandler);  }
@Test public void testSetProperties() { Class<? extends ItemSelectorReturnType> testURLItemSelectorReturnTypeClass = _testURLItemSelectorReturnType.getClass(); String json = StringBundler.concat( "{\"desiredItemSelectorReturnTypes\":\"", testURLItemSelectorReturnTypeClass.getName(), "\",\"tags\":", "[\"tag1\",\"tag2\",\"tag3\"],\"user\":\"Joe Bloggs\"}"); _flickrItemSelectorCriterion = _stubItemSelectorCriterionSerializerImpl.deserialize( _flickrItemSelectorCriterion.getClass(), json); Assert.assertEquals( "Joe Bloggs", _flickrItemSelectorCriterion.getUser()); Assert.assertArrayEquals( new String[] {"tag1", "tag2", "tag3"}, _flickrItemSelectorCriterion.getTags()); Assert.assertEquals( ListUtil.fromArray(_testURLItemSelectorReturnType), _flickrItemSelectorCriterion.getDesiredItemSelectorReturnTypes()); }