EnumGeneratorUtil { public static List<String> enumConstantsOf(Column column) { final Optional<String> ec = column.getEnumConstants(); final String[] enumConstants = ec .orElseThrow(() -> new NoSuchElementException( "Column '" + column.getId() + "' in table '" + column.getParentOrThrow().getId() + "' was marked as an enum but no enum constants was specified." )) .split(","); return Stream.of(enumConstants) .sorted() .collect(toList()); } private  EnumGeneratorUtil(); static String enumNameOf(Column column, Injector injector); static List<String> enumConstantsOf(Column column); static Stream<Class<?>> classesIn(Class<?> entityClass);  }
@Test void enumConstantsOfWithNoEnumConstants() { final Project project = TestUtil.project(); final Column column = DocumentDbUtil.referencedColumn(project,"speedment_test","speedment_test", "user", "surname"); assertThrows(NoSuchElementException.class, () -> EnumGeneratorUtil.enumConstantsOf(column)); }