@Test
public void key() throws Exception {

    for (Aggregation aggregation : aggregations) {
        byte[] bytes = mapper.writeValueAsBytes(aggregation);
        PrimaryKey primaryKey = itemMapper.key(ByteBuffer.wrap(bytes));
        assertTrue(primaryKey.hasComponent(ItemMapper.CAMPAIGN_TABLE_HASH_KEY));
        assertTrue(primaryKey.hasComponent(ItemMapper.PERIOD_TABLE_RANGE_KEY));
    }
}