Candy[] assignRandomCandytypes() throws JsonParseException {
    var jp = new JsonParser();
    jp.parse();
    var randomCode = new Candy[jp.candies.size() - 2]; //exclude generic types 'fruit' and 'candy'
    var i = 0;
    for (var e = jp.candies.keys(); e.hasMoreElements(); ) {
      var s = e.nextElement();
      if (!s.equals(FRUIT) && !s.equals(CANDY)) {
        //not generic
        randomCode[i] = jp.candies.get(s);
        i++;
      }
    }
    return randomCode;
  }
@Test
  void assignRandomCandyTypesTest() {
    var cp = new CellPool(10);
    var ht = new Hashtable<String, Boolean>();
    var parentTypes = 0;
    for (var i = 0; i < cp.randomCode.length; i++) {
      ht.putIfAbsent(cp.randomCode[i].name, true);
      if (cp.randomCode[i].name.equals("fruit") || cp.randomCode[i].name.equals("candy")) {
        parentTypes++;
      }
    }
    assertTrue(ht.size() == 5 && parentTypes == 0);
  }