@Test void shouldUseHttpStatusEqualsAndHashCode() { final HttpStatus status = HttpStatus.I_AM_A_TEAPOT; final HttpStatusAdapter adapter = new HttpStatusAdapter(HttpStatus.I_AM_A_TEAPOT); assertThat(adapter, is(adapter)); assertThat(adapter, is(new HttpStatusAdapter(status))); assertThat(adapter, not(new HttpStatusAdapter(HttpStatus.BAD_GATEWAY))); assertThat(adapter, not(HttpStatus.I_AM_A_TEAPOT)); assertThat(adapter.hashCode(), is(new HttpStatusAdapter(HttpStatus.I_AM_A_TEAPOT).hashCode())); }
@Override public int hashCode() { return Objects.hashCode(status); }
HttpStatusAdapter implements StatusType { @Override public int hashCode() { return Objects.hashCode(status); } }
HttpStatusAdapter implements StatusType { @Override public int hashCode() { return Objects.hashCode(status); } HttpStatusAdapter(final HttpStatus status); }
HttpStatusAdapter implements StatusType { @Override public int hashCode() { return Objects.hashCode(status); } HttpStatusAdapter(final HttpStatus status); @Override int getStatusCode(); @Override String getReasonPhrase(); @Override boolean equals(final Object that); @Override int hashCode(); }
HttpStatusAdapter implements StatusType { @Override public int hashCode() { return Objects.hashCode(status); } HttpStatusAdapter(final HttpStatus status); @Override int getStatusCode(); @Override String getReasonPhrase(); @Override boolean equals(final Object that); @Override int hashCode();  }