private static void put(HandTypesMap map, HandTypesKeyImpl key, HandTypesImpl value, int i, boolean flag) {
    final int k = i;
    key.setBoolean(flag);
    key.setInt(k);
    value.setBoolean(flag);
    value.setInt(k);
    int size = map.size();
    map.put(key, value);
    if (size + 1 != map.size()) {
      map.put(key, value);
      assertEquals(size + 1, map.size());
    }
    HandTypes ht = map.get(key);
    if (ht == null)
      ht = map.get(key);
    assertEquals(i, ht.getInt());
    if (flag != ht.getBoolean())
      assertEquals(flag, ht.getBoolean());
  }