@Test public void testGenerics() { final Optional<List<Integer>> opt = Optional.of(Arrays.asList(1, 2, 3, 4)); assertThat(opt, OptionalMatchers.optionalWithValue(hasSize(4))); }
public static Matcher<Optional<?>> optionalWithValue() { return optionalWithValue(anything()); }
OptionalMatchers { public static Matcher<Optional<?>> optionalWithValue() { return optionalWithValue(anything()); } }
OptionalMatchers { public static Matcher<Optional<?>> optionalWithValue() { return optionalWithValue(anything()); } private  OptionalMatchers(); }
OptionalMatchers { public static Matcher<Optional<?>> optionalWithValue() { return optionalWithValue(anything()); } private  OptionalMatchers(); static Matcher<Optional<T>> emptyOptional(); static Matcher<Optional<?>> optionalWithValue(); static Matcher<Optional<? extends T>> optionalWithValue(final Matcher<T> matcher); }
OptionalMatchers { public static Matcher<Optional<?>> optionalWithValue() { return optionalWithValue(anything()); } private  OptionalMatchers(); static Matcher<Optional<T>> emptyOptional(); static Matcher<Optional<?>> optionalWithValue(); static Matcher<Optional<? extends T>> optionalWithValue(final Matcher<T> matcher);  }