DisplayableEnum implements Displayable, Expression<String> { @Override public List<InfoGUI> getInfo() { ArrayList<String> values = new ArrayList<>(); values.add(VALUE_UNDEFINED); values.addAll(range); return Collections.singletonList(new InfoGUI(name, name, ComponentType.CHOICE, values)); } DisplayableEnum(String name, Set<String> range); @Override List<Constraint> createConstraint(String value); @Override List<InfoGUI> getInfo(); @Override String getName(); @Override String use(); @Override Expression<String> substitute(String name, Object value); @Override String value();  }
@Test public void getInfo() { List<InfoGUI> infos = defaultEnum.getInfo(); assertEquals(1, infos.size()); InfoGUI info = infos.get(0); assertEquals("test_enum", info.getLabelCaption()); assertEquals("test_enum", info.getVariableName()); assertEquals("Undefined", info.getValues().get(0)); assertEquals("first", info.getValues().get(1)); assertEquals("second", info.getValues().get(2)); }