void (int size) { List<Object> values = new ArrayList<>(); for (int i = 0; i < size; i++) { values.add("Value#" + i); } KeyFMap map = createKeyFMap(KEYS.subList(0, size), values); Key[] actualKeys = map.getKeys(); assertEquals(size, actualKeys.length); for (Key key : KEYS.subList(0, size)) { assertTrue("Key not found: " + key, ArrayUtil.contains(key, actualKeys)); } }