SegmentParser { public ListInfo parseList(RecordId parentId, RecordId listId, int count) { if (count != 0) { onListBucket(parentId, listId, 0, count, count); } return new ListInfo(listId, count, noOfListSlots(count) * RECORD_ID_BYTES); } SegmentParser(@NotNull SegmentReader reader); NodeInfo parseNode(RecordId nodeId); TemplateInfo parseTemplate(RecordId templateId); MapInfo parseMap(RecordId parentId, RecordId mapId, MapRecord map); MapInfo parseMapDiff(RecordId mapId, MapRecord map); MapInfo parseMapLeaf(RecordId mapId, MapRecord map); MapInfo parseMapBranch(RecordId mapId, MapRecord map); PropertyInfo parseProperty(RecordId parentId, RecordId propertyId, PropertyTemplate template); ValueInfo parseValue(RecordId parentId, RecordId valueId, Type<?> type); BlobInfo parseBlob(RecordId blobId); BlobInfo parseString(RecordId stringId); ListInfo parseList(RecordId parentId, RecordId listId, int count); ListBucketInfo parseListBucket(RecordId listId, int index, int count, int capacity);  }
@Test public void emptyList() { RecordId listId = newRecordId(store.getSegmentIdProvider(), new Random()); ListInfo listInfo = new TestParser(store.getReader(), "emptyList").parseList(null, listId, 0); assertEquals(listId, listInfo.listId); assertEquals(0, listInfo.count); }