### Question:
Capabilities { public static List<Integer> toIntList(Capabilities capabilities) { return capabilities.capabilities.stream().map(Enum::ordinal).sorted().collect(Collectors.toList()); } Capabilities(Capability... capabilities);  Capabilities(Capabilities capabilities);  Capabilities(Collection<Capability> capabilities); void set(Capability... capabilities); void set(Capabilities capabilities); void set(Collection<Capability> capabilities); void addAll(Capability... capabilities); void addAll(Capabilities capabilities); boolean containsAll(final Set<Capability> requiredItems); boolean containsAll(final Capabilities capabilities); boolean containsAll(Capability... capabilities); boolean isEmpty(); static List<Integer> toIntList(Capabilities capabilities); static Capabilities fromIntList(List<Integer> capabilities); static Capabilities fromStringList(String list); String toStringList(); static boolean hasMandatoryCapability(Capabilities capabilities); static boolean hasMandatoryCapability(Capabilities capabilities, Capability mandatoryCapability); @Override String toString(); String prettyPrint(); int size(); static final Capabilities app; }### Answer:
@Test public void testToIntList() { assertEquals(Collections.emptyList(), Capabilities.toIntList(new Capabilities())); assertEquals(Collections.singletonList(12), Capabilities.toIntList(new Capabilities(Capability.MEDIATION))); assertEquals(Arrays.asList(6, 12), Capabilities.toIntList(new Capabilities(Capability.MEDIATION, Capability.BLIND_VOTE))); }