### Question:
OptionMatchers { public static <T> Matcher<? super Option<T>> hasNoValue() { return new OptionHasNoValueMatcher(); }  static Matcher<? super Option<T>> hasValue(); static Matcher<? super Option<T>> hasValue(final T value); static Matcher<? super Option<T>> hasValueOf(Class<T> valueClass); static Matcher<? super Option<T>> hasNoValue(); static Matcher<? super Option<T>> hasNoValueOf(Class<T> valueClass);  }### Answer:
@Test public void shouldMatchWhenHasNoValueMatcherEvaluatesOptionWithNoValue() throws Exception { Option<String> option = Option.none(); Matcher<? super Option<String>> matcher = hasNoValue(); assertThat(matcher, successfullyMatches(option)); }
@Test public void shouldMismatchWhenHasNoValueMatcherEvaluatesOptionWithAnyValue() throws Exception { Option<String> option = Option.option("value"); Matcher<? super Option<String>> matcher = hasNoValue(); assertThat(matcher, mismatchesSampleWithMessage(option, "Option with value: \"value\"")); }
@Test public void shouldProvideAdequateDescriptionWhenHasNoValueAskedToDescribeItself() throws Exception { Matcher<? super Option<String>> matcher = hasNoValue(); StringDescription description = new StringDescription(); matcher.describeTo(description); assertThat(description.toString(), is("Option with no value.")); }