ItemMapper { public Object mergeValue(Object newObject, Object oldValue) { Object result = newObject; if (newObject instanceof Long) { Long oldLong = (Long)oldValue; Long newLong = (Long)newObject; result = (oldLong+newLong); } else if (newObject instanceof BigDecimal) { BigDecimal oldDecimal = (BigDecimal)oldValue; BigDecimal newDecimal = (BigDecimal)newObject; result = (oldDecimal.add(newDecimal)); } return result; }  PrimaryKey key(ByteBuffer byteBuffer); PrimaryKey key(JsonNode node); PrimaryKey primaryKey(Item item); Map<PrimaryKey, Item> mergeItems(List<ByteBuffer> list); List<Item> mergeItems(Collection<Item> created, Collection<Item> read); Item mergeItem(PrimaryKey primaryKey, Item newItem, Item oldItem); Object mergeValue(Object newObject, Object oldValue); Item fromByteBuffer(ByteBuffer byteBuffer); static final String CAMPAIGN_TABLE_HASH_KEY; static final String PERIOD_TABLE_RANGE_KEY; }
@Test public void mergeValue() { }