public static <T> Stream<T> stream(Iterable<T> it) {
        return StreamSupport.stream(it.spliterator(), false);
    }
@Test
    public void testOptionalStream() {
        Stream<Object> empty = Tools.stream(Optional.empty());
        assertThat(empty.count(), is(0L));

        String value = "value";
        Stream<String> stream = Tools.stream(Optional.of(value));
        assertThat(stream.allMatch(value::equals), is(true));
    }