/**
   * WARNING: don't do stupid things such like below, we do this because we can guarantee the shard
   * id will NOT change. if you want to use cobar client corretly, make sure you are partitioning
   * you databases with shard id that will not be changed once it's created!!!
   */
  public void testUpdateOnCobarSqlMapClientTemplate() {
    String[] names = {"Aaron", "Amily", "Aragon", "Darren", "Darwin"};
    batchInsertMultipleFollowersAsFixture(names);

    String nameSuffix = "Wang";
    for (String name : names) {
      Follower follower =
          (Follower)
              getSqlMapClientTemplate()
                  .queryForObject("com.alibaba.cobar.client.entities.Follower.finaByName", name);
      assertNotNull(follower);
      follower.setName(follower.getName() + nameSuffix);
      getSqlMapClientTemplate()
          .update("com.alibaba.cobar.client.entities.Follower.update", follower);

      Long id = follower.getId();

      follower = null;
      follower =
          (Follower)
              getSqlMapClientTemplate()
                  .queryForObject("com.alibaba.cobar.client.entities.Follower.finaByName", name);
      assertNull(follower);

      follower =
          (Follower)
              getSqlMapClientTemplate()
                  .queryForObject("com.alibaba.cobar.client.entities.Follower.load", id);
      assertNotNull(follower);
      assertEquals(name + nameSuffix, follower.getName());
    }
  }