public static <T> Stream<T> stream(Enumeration<T> e) {
        return StreamSupport.stream(
                Spliterators.spliteratorUnknownSize(
                        new Iterator<T>() {
                            public T next() {
                                return e.nextElement();
                            }

                            public boolean hasNext() {
                                return e.hasMoreElements();
                            }
                        },
                        Spliterator.ORDERED), false);
    }
@Test
    public void test_count_stream_from_enumeration() {
        Enumeration<Integer> someEnumeration = Collections.enumeration(Arrays.asList(1, 2, 3));
        assertThat(EnumerationUtil.stream(someEnumeration).count()).isEqualTo(3);
    }