### Question:
ObjectStreams { public static <T> ObjectStream<T> empty() { return wrap(Collections.<T>emptyList()); } private  ObjectStreams(); static ObjectStream<T> wrap(Iterator<? extends T> iterator); static ObjectStream<T> wrap(Stream<? extends T> stream); static ObjectStream<T> wrap(Stream<? extends T> stream,
                                           @WillCloseWhenClosed Closeable root); static ObjectStream<T> wrap(Collection<? extends T> collection); static ObjectStream<T> filter(@WillCloseWhenClosed ObjectStream<T> stream, Predicate<? super T> predicate); static ObjectStream<T> filter(@WillCloseWhenClosed final ObjectStream<?> source, final Class<T> type); static ObjectStream<T> consume(int n, ObjectStream<T> stream); @Deprecated static ObjectStream<T> transform(@WillCloseWhenClosed ObjectStream<S> objectStream, Function<? super S, ? extends T> function); static ObjectStream<T> empty(); @SuppressWarnings("PMD.LooseCoupling") @Deprecated static List<T> makeList(@WillClose ObjectStream<? extends T> objectStream); @SuppressWarnings("PMD.LooseCoupling") @Deprecated static int count(@WillClose ObjectStream<?> objectStream); @Deprecated static ObjectStream<T> sort(@WillClose ObjectStream<T> objectStream,
                                           Comparator<? super T> comp); @SafeVarargs @SuppressWarnings("varargs") // method is safe MDE 2015-05-08 static ObjectStream<T> of(T... contents); static ObjectStream<T> concat(Iterable<? extends ObjectStream<? extends T>> streams); @SafeVarargs @SuppressWarnings("varargs") // method is safe MDE 2015-05-08 static ObjectStream<T> concat(ObjectStream<? extends T>... objectStreams);  }### Answer:
@Test public void testEmptyStream() { ObjectStream<String> cur = ObjectStreams.empty(); try { assertThat(cur.readObject(), nullValue()); try { cur.iterator().next(); fail("next() on empty stream should fail"); } catch (NoSuchElementException e) { } } finally { cur.close(); } }
@Test public void testEmptyStreamIterable() { ObjectStream<String> cur = ObjectStreams.empty(); try { assertThat(Iterables.isEmpty(cur), equalTo(true)); } finally { cur.close(); } }