@Test
public final void testEquals () {

    final ByteBuffer testBuffer = ByteBuffer.allocate(TEST_CASE_1_ARRAY.length);
    assertNotNull(testBuffer);
    testBuffer.put(TEST_CASE_1_ARRAY);
    testBuffer.rewind();
    final BinaryDataSegment dataSegment = new BinaryDataSegment(CHUNK_SIZE);
    dataSegment.append(testBuffer, testBuffer.limit());
    assertNotNull(dataSegment);
    assertEquals(5, dataSegment.getLength());
    final BinaryDataSegment anotherDataSegment = new BinaryDataSegment(CHUNK_SIZE);
    testBuffer.rewind();
    anotherDataSegment.append(testBuffer, testBuffer.limit());
    assertNotNull(anotherDataSegment);
    assertEquals(5, anotherDataSegment.getLength());
    assertTrue(dataSegment.equals(anotherDataSegment));
}