### Question:
SchemaStore extends AbstractDynamicStore implements Iterable<SchemaRule> { public Iterator<SchemaRule> loadAllSchemaRules() { return new SchemaStorage( this ).loadAllSchemaRules(); } SchemaStore(
            File file,
            File idFile,
            Config conf,
            IdType idType,
            IdGeneratorFactory idGeneratorFactory,
            PageCache pageCache,
            LogProvider logProvider,
            RecordFormats recordFormats,
            OpenOption... openOptions ); @Override void accept( Processor<FAILURE> processor, DynamicRecord record ); List<DynamicRecord> allocateFrom( SchemaRule rule ); Iterator<SchemaRule> loadAllSchemaRules(); @Override Iterator<SchemaRule> iterator(); static final String TYPE_DESCRIPTOR; static final int BLOCK_SIZE; }### Answer:
@Test public void storeAndLoadAllRules() { long indexId = store.nextId(); long constraintId = store.nextId(); Collection<SchemaRule> rules = Arrays.asList( uniqueIndexRule( indexId, constraintId, PROVIDER_DESCRIPTOR, 2, 5, 3 ), constraintUniqueRule( constraintId, indexId, 2, 5, 3 ), indexRule( store.nextId(), PROVIDER_DESCRIPTOR, 0, 5 ), indexRule( store.nextId(), PROVIDER_DESCRIPTOR, 1, 6, 10, 99 ), constraintExistsRule( store.nextId(), 5, 1 ) ); for ( SchemaRule rule : rules ) { storeRule( rule ); } Collection<SchemaRule> readRules = asCollection( store.loadAllSchemaRules() ); assertEquals( rules, readRules ); }