public Chapter readChapter(@NonNull FrameHeader frameHeader) throws IOException, ID3ReaderException {
        int chapterStartedPosition = getPosition();
        String elementId = readIsoStringNullTerminated(100);
        long startTime = readInt();
        skipBytes(12); // Ignore end time, start offset, end offset

        Chapter chapter = new Chapter();
        chapter.setStart(startTime);
        chapter.setChapterId(elementId);

        // Read sub-frames
        while (getPosition() < chapterStartedPosition + frameHeader.getSize()) {
            FrameHeader subFrameHeader = readFrameHeader();
            readChapterSubFrame(subFrameHeader, chapter);
        }
        return chapter;
    }
@Test
    public void testReadChapterWithTitle() throws IOException, ID3ReaderException {
        byte[] title = {
            ID3Reader.ENCODING_ISO,
            'H', 'e', 'l', 'l', 'o', // Title
            0 // Null-terminated
        };
        byte[] chapterData = Id3ReaderTest.concat(
            CHAPTER_WITHOUT_SUBFRAME,
            Id3ReaderTest.generateFrameHeader(ChapterReader.FRAME_ID_TITLE, title.length),
            title);
        FrameHeader header = new FrameHeader(ChapterReader.FRAME_ID_CHAPTER, chapterData.length, (short) 0);
        CountingInputStream inputStream = new CountingInputStream(new ByteArrayInputStream(chapterData));
        ChapterReader reader = new ChapterReader(inputStream);
        Chapter chapter = reader.readChapter(header);
        assertEquals(CHAPTER_WITHOUT_SUBFRAME_START_TIME, chapter.getStart());
        assertEquals("Hello", chapter.getTitle());
    }