### Question:
LogSegment implements Read, Write { long getStartOffset() { return startOffset; } LogSegment(String name, File file, long capacityInBytes, StoreConfig config, StoreMetrics metrics,
      boolean writeHeader);   LogSegment(String name, File file, StoreConfig config, StoreMetrics metrics);   LogSegment(File file, long capacityInBytes, StoreConfig config, StoreMetrics metrics, FileChannel fileChannel); @Override int appendFrom(ByteBuffer buffer); @Override void appendFrom(ReadableByteChannel channel, long size); @Override void readInto(ByteBuffer buffer, long position); @Override String toString();  }### Answer:
@Test public void constructorTest() throws IOException, StoreException { LogSegment segment = getSegment("log_current", STANDARD_SEGMENT_SIZE, false); assertEquals("Start offset should be 0 when no headers are written", 0, segment.getStartOffset()); }