@Override
      public void append(LogSegment segment, ByteBuffer buffer) throws StoreException {
        int writeSize = buffer.remaining();
        segment.appendFrom(Channels.newChannel(new ByteBufferInputStream(buffer)), writeSize);
        assertFalse("The buffer was not completely written", buffer.hasRemaining());
      }
Tests {@link LogSegment#appendFrom(ByteBuffer)} and {@link LogSegment#appendFrom(ReadableByteChannel, long)} for
various cases.
@throws IOException
ambry-store/src/test/java/com/github/ambry/store/LogSegmentTest.java