@Test public void shouldHaveFamily() { Stream.of(MoreStatus.values()) .forEach( status -> assertThat(status, hasFeature("family", StatusType::getFamily, notNullValue()))); }
@Test public void shouldHaveReasonPhrase() { Stream.of(MoreStatus.values()) .forEach( status -> assertThat( status, hasFeature( "reason phrase", StatusType::getReasonPhrase, not(isEmptyOrNullString())))); }
@Test public void shouldBeDistinctFromStatus() { Stream.of(MoreStatus.values()) .map(StatusType::getStatusCode) .forEach( code -> { final Status status = Status.fromStatusCode(code); assertThat("Duplicate code: " + code, status, is(nullValue())); }); }