OtherDirective implements Directive { @Override @Nonnull public String getValue() { return value; } OtherDirective(@Nonnull String field, @Nonnull String value); @Override @Nonnull String getField(); @Override @Nonnull String getValue(); @Override boolean equals(@Nullable Object o); @Override int hashCode(); @Nonnull @Override String toString();  }
@Test public void givenValidOtherDirective_whenGetValue_theResultEqualsExpected() { OtherDirective directive = new OtherDirective(FIELD, VALUE); assertThat(directive.getValue(), equalTo(VALUE)); }