@Test public void testANonStringPropertyIsIgnored() { String json = "{" + " \"channel\" : 1.0," + " \"site\" : \"amazon\"," + " \"items\" : [ \"B009S4IJCK\", \"B0076UICIO\" ,\"B0096TJCXW\" ]"+ "}"; IndexingRequestConverter converter = createConverter(ByteBuffer.wrap(json.getBytes())); RelatedItemIndexingMessage message = new RelatedItemIndexingMessage(new SystemPropertiesConfiguration()); converter.translateTo(message,1); assertEquals(1,message.getIndexingMessageProperties().getNumberOfProperties()); }
@Override public void translateTo(RelatedItemIndexingMessage convertedTo, long sequence) { convertedTo.setValidMessage(true); convertedTo.setUTCFormattedDate(date); parseProductArray(convertedTo,maxNumberOfAdditionalProperties); parseAdditionalProperties(convertedTo.getIndexingMessageProperties(), object, maxNumberOfAdditionalProperties); }
JsonSmartIndexingRequestConverter implements IndexingRequestConverter { @Override public void translateTo(RelatedItemIndexingMessage convertedTo, long sequence) { convertedTo.setValidMessage(true); convertedTo.setUTCFormattedDate(date); parseProductArray(convertedTo,maxNumberOfAdditionalProperties); parseAdditionalProperties(convertedTo.getIndexingMessageProperties(), object, maxNumberOfAdditionalProperties); } }
JsonSmartIndexingRequestConverter implements IndexingRequestConverter { @Override public void translateTo(RelatedItemIndexingMessage convertedTo, long sequence) { convertedTo.setValidMessage(true); convertedTo.setUTCFormattedDate(date); parseProductArray(convertedTo,maxNumberOfAdditionalProperties); parseAdditionalProperties(convertedTo.getIndexingMessageProperties(), object, maxNumberOfAdditionalProperties); } JsonSmartIndexingRequestConverter(Configuration config, ISO8601UTCCurrentDateAndTimeFormatter dateCreator, ByteBuffer requestData);  JsonSmartIndexingRequestConverter(Configuration config, ISO8601UTCCurrentDateAndTimeFormatter dateCreator, ByteBuffer requestData,
        int maxNumberOfAllowedProperties,int maxNumberOfRelatedItems); }
JsonSmartIndexingRequestConverter implements IndexingRequestConverter { @Override public void translateTo(RelatedItemIndexingMessage convertedTo, long sequence) { convertedTo.setValidMessage(true); convertedTo.setUTCFormattedDate(date); parseProductArray(convertedTo,maxNumberOfAdditionalProperties); parseAdditionalProperties(convertedTo.getIndexingMessageProperties(), object, maxNumberOfAdditionalProperties); } JsonSmartIndexingRequestConverter(Configuration config, ISO8601UTCCurrentDateAndTimeFormatter dateCreator, ByteBuffer requestData);  JsonSmartIndexingRequestConverter(Configuration config, ISO8601UTCCurrentDateAndTimeFormatter dateCreator, ByteBuffer requestData,
        int maxNumberOfAllowedProperties,int maxNumberOfRelatedItems); @Override void translateTo(RelatedItemIndexingMessage convertedTo,
                            long sequence); }
JsonSmartIndexingRequestConverter implements IndexingRequestConverter { @Override public void translateTo(RelatedItemIndexingMessage convertedTo, long sequence) { convertedTo.setValidMessage(true); convertedTo.setUTCFormattedDate(date); parseProductArray(convertedTo,maxNumberOfAdditionalProperties); parseAdditionalProperties(convertedTo.getIndexingMessageProperties(), object, maxNumberOfAdditionalProperties); } JsonSmartIndexingRequestConverter(Configuration config, ISO8601UTCCurrentDateAndTimeFormatter dateCreator, ByteBuffer requestData);  JsonSmartIndexingRequestConverter(Configuration config, ISO8601UTCCurrentDateAndTimeFormatter dateCreator, ByteBuffer requestData,
        int maxNumberOfAllowedProperties,int maxNumberOfRelatedItems); @Override void translateTo(RelatedItemIndexingMessage convertedTo,
                            long sequence);  }