Protocols { @LapsedWith(module = JDK8, value = "Streams") public static List<String> names() { List<String> names = Lists.newArrayList(); for (Iterator<Protocol> it = iterator(); it.hasNext();) { names.add(it.next().getName()); } return names; } private  Protocols(); static Protocol getByName(String name); @LapsedWith(module = JDK8, value = "Streams") static Optional<Protocol> tryByName(String name); static List<Protocol> list(); @LapsedWith(module = JDK8, value = "Streams") static List<String> names();  }
@Test public void defaultAndDummyProtocolsAreRegistered() { assertThat( new HashSet<String>(Protocols.names()), is(new HashSet<String>(Arrays.asList("ardulink2", "dummyProto")))); }