### Question:
TabletRegistry { public void startOnDiskRegions() throws IOException { List<String> quorums = configDirectory.configuredQuorums(); for (String quorum : quorums) { try { List<Long> peers = configDirectory.readPeers(quorum); byte[] regionInfoBytes = configDirectory.readBinaryData(quorum, ConfigDirectory.regionInfoFile); byte[] tableDescriptorBytes = configDirectory.readBinaryData(quorum, ConfigDirectory.htableDescriptorFile); HRegionInfo regionInfo = HRegionInfo.parseFrom(regionInfoBytes); HTableDescriptor tableDescriptor = HTableDescriptor.parseFrom(tableDescriptorBytes); Path basePath = configDirectory.getBaseConfigPath(); Tablet tablet = tabletFactory.create( c5server, regionInfo, tableDescriptor, peers, basePath, legacyConf, replicationModule, regionCreator, new UserTabletLeaderBehavior(c5server, regionInfo)); tablet.start(); tablet.setStateChangeChannel(commonStateChangeChannel); ConcurrentSkipListMap<byte[], Tablet> tablets; String tableName = regionInfo.getTable().getNameAsString(); if (tables.containsKey(tableName)) { tablets = tables.get(tableName); } else { tablets = new ConcurrentSkipListMap<>(new C5Compare()); TableName hbaseTableName = TabletNameHelpers.getClientTableName(regionInfo.getTable()); tables.put(TabletNameHelpers.toString(hbaseTableName), tablets); } tablets.put(Bytes.add(Bytes.toBytes(regionInfo.getTable().toString()), Bytes.toBytes(","), regionInfo.getEndKey()), tablet); } catch (IOException | DeserializationException e) { LOG.error("Unable to start quorum, due to config error: " + quorum, e); } } } TabletRegistry(C5Server c5server,
                        ConfigDirectory configDirectory,
                        Configuration legacyConf,
                        Channel<TabletStateChange> commonStateChangeChannel,
                        ReplicationModule replicationModule,
                        TabletFactory tabletFactory,
                        Region.Creator regionCreator); void startOnDiskRegions(); Tablet startTablet(HRegionInfo regionInfo,
                            HTableDescriptor tableDescriptor,
                            List<Long> peerList); Tablet getTablet(String tableName, byte[] row); Tablet getTablet(String tableName, ByteBuffer row); Collection<Tablet> dumpTablets(); ConcurrentSkipListMap<byte[], Tablet> getTablets(String tableName);  }### Answer:
@Test public void shouldReadFilesFromDiskThenStartTabletsDescribedThereIn() throws Exception { context.checking(new Expectations() {{ allowing(configDirectory).readBinaryData(with(any(String.class)), with(equal(ConfigDirectory.regionInfoFile))); will(returnValue(regionInfoBytes)); allowing(configDirectory).readBinaryData(with(any(String.class)), with(equal(ConfigDirectory.htableDescriptorFile))); will(returnValue(rootTableDescriptorBytes)); allowing(configDirectory).readPeers(with(any(String.class))); will(returnValue(peerList)); allowing(configDirectory).configuredQuorums(); will(returnValue(Lists.newArrayList(ROOT_QUORUM_NAME))); allowing(configDirectory).getBaseConfigPath(); }}); tabletRegistry.startOnDiskRegions(); }