### Question:
SpaceFillingCurveSettingsReader implements Header.Reader { @Override public void read( ByteBuffer headerBytes ) { byte version = headerBytes.get(); if ( version != VERSION ) { throw new UnsupportedOperationException( "Invalid crs settings header version " + version + ", was expecting " + VERSION ); } int count = headerBytes.getInt(); for ( int i = 0; i < count; i++ ) { readNext( headerBytes ); } } SpaceFillingCurveSettingsReader( Map<CoordinateReferenceSystem,SpaceFillingCurveSettings> settings ); @Override void read( ByteBuffer headerBytes );  }### Answer:
@Test void shouldReadMultipleSettings() { ConfiguredSpaceFillingCurveSettingsCache globalSettings = new ConfiguredSpaceFillingCurveSettingsCache( Config.defaults() ); Map<CoordinateReferenceSystem,SpaceFillingCurveSettings> expectedSpecificSettings = new HashMap<>(); rememberSettings( globalSettings, expectedSpecificSettings, WGS84, WGS84_3D, Cartesian ); IndexSpecificSpaceFillingCurveSettingsCache specificSettings = new IndexSpecificSpaceFillingCurveSettingsCache( globalSettings, expectedSpecificSettings ); SpaceFillingCurveSettingsWriter writer = new SpaceFillingCurveSettingsWriter( specificSettings ); byte[] bytes = new byte[PageCache.PAGE_SIZE]; writer.accept( new ByteArrayPageCursor( bytes ) ); Map<CoordinateReferenceSystem,SpaceFillingCurveSettings> readExpectedSettings = new HashMap<>(); SpaceFillingCurveSettingsReader reader = new SpaceFillingCurveSettingsReader( readExpectedSettings ); reader.read( ByteBuffer.wrap( bytes ) ); assertEquals( expectedSpecificSettings, readExpectedSettings ); }