@Test
void testEqualsAndHashcode() {

    HeapChannelBuffer b1 = new HeapChannelBuffer("hello-world".getBytes());
    HeapChannelBuffer b2 = new HeapChannelBuffer("hello-world".getBytes());
    MatcherAssert.assertThat(b1.equals(b2), is(true));
    MatcherAssert.assertThat(b1.hashCode(), is(b2.hashCode()));
    b1 = new HeapChannelBuffer("hello-world".getBytes());
    b2 = new HeapChannelBuffer("hello-worldd".getBytes());
    MatcherAssert.assertThat(b1.equals(b2), is(false));
    MatcherAssert.assertThat(b1.hashCode(), not(b2.hashCode()));
}