@Override
    public <V> MultiLabel generateOutput(V label) {
        if (label instanceof Collection) {
            Collection<?> c = (Collection<?>) label;
            List<Pair<String,Boolean>> dimensions = new ArrayList<>();
            for (Object o : c) {
                dimensions.add(MultiLabel.parseElement(o.toString()));
            }
            return MultiLabel.createFromPairList(dimensions);
        }
        return MultiLabel.parseString(label.toString());
    }
@Test
    public void testGenerateOutput_set() {
        MultiLabelFactory factory = new MultiLabelFactory();
        MultiLabel output = factory.generateOutput(new HashSet<>(Arrays.asList("a=true", "b=true", "c=true")));
        assertEquals(3, output.getLabelSet().size());
        assertEquals("a,b,c", output.getLabelString());

        output = factory.generateOutput(new HashSet<>(Arrays.asList("a", "b", "c")));
        assertEquals(3, output.getLabelSet().size());
        assertEquals("a,b,c", output.getLabelString());
    }