Property { public static List<Property> list(String name, Collection<String> values) { return values.stream() .map(x -> Property.create(name, x)) .collect(Collectors.toList()); } private  Property(String name, String value); String name(); String value(); static Property create(String name, String value); static List<Property> list(String name, Collection<String> values); static List<Property> list(String... items); static List<Property> concatenate(@SuppressWarnings("unchecked") List<Property>... lists); static String combineNames(String... names); static String combineNames(List<String> names); static String combineNames(Stream<String> names);  }
@Test public void testList() { List<Property> list = Property.list("a", "0", "b", "1"); assertEquals(2, list.size()); assertEquals("a", list.get(0).name()); assertEquals("0", list.get(0).value()); assertEquals("b", list.get(1).name()); assertEquals("1", list.get(1).value()); }