IntListVariantGenerator implements IGameVariantGenerator { @Override public Set<IGameVariant> getVariants() { final LinkedHashSet<IGameVariant> result = new LinkedHashSet<>(); for (final int i : values) { result.add(new IntGameVariant(i)); } return result; } IntListVariantGenerator(final String variantChooseText, final int... values); @Override Set<IGameVariant> getVariants();  }
@Test void shouldGetVariants() { IntListVariantGenerator variantGenerator = new IntListVariantGenerator("choose_text", 1, 2, 23, 46, 5); Set<IGameVariant> result = variantGenerator.getVariants(); ArrayList<String> expected = new ArrayList<>(List.of("1", "2", "23", "46", "5")); for (IGameVariant variant : result) { assertTrue(expected.contains(variant.getLabel(translator))); } }