@Test
public void testSetGeneratedKeyBack () throws SQLException {

    MyTask myTask = new MyTask();
    Entity entity = new Entity();
    entity.setValue(new Gson().toJson(ImmutableMap.of("keyC", 1)));
    EntityMeta meta = new EntityMeta();
    meta.setPrimaryKeyNames(Lists.newArrayList("keyC"));
    meta.setColumnNames(Lists.newArrayList("keyC"));
    meta.setColumnTypes(Lists.newArrayList("INTEGER"));
    ColumnMeta columnMeta = new ColumnMeta();
    columnMeta.setType(JDBCType.INTEGER.getName());
    meta.setMetaMap(ImmutableMap.of("keyC", columnMeta));
    entity.setEntityMeta(meta);
    Hints hints = Hints.hints().setIdBack().setSize(Lists.newArrayList(entity));
    hints.getKeyHolder().addKey(ImmutableMap.of("keyC", 2));
    KeyHolder.setGeneratedKeyBack(myTask, hints, Lists.newArrayList(entity));
    Assert.assertTrue(Double.parseDouble(new Gson().fromJson(entity.getValue(), Map.class).get("keyC").toString()) > 1);
}