### Question:
RecordFormatPropertyConfigurator { public void configure() { Map<String,String> formatConfig = MapUtil.stringMap(); int headerSize = recordFormats.dynamic().getRecordHeaderSize(); configureIntegerSetting( config, string_block_size, DEFAULT_BLOCK_SIZE, headerSize, formatConfig ); configureIntegerSetting( config, array_block_size, DEFAULT_BLOCK_SIZE, headerSize, formatConfig ); configureIntegerSetting( config, label_block_size, DEFAULT_LABEL_BLOCK_SIZE, headerSize, formatConfig ); if ( !formatConfig.isEmpty() ) { config.augment( formatConfig ); } } RecordFormatPropertyConfigurator( RecordFormats recordFormats, Config config ); void configure();  }### Answer:
@Test public void keepUserDefinedFormatConfig() { Config config = Config.defaults( string_block_size, "36" ); RecordFormats recordFormats = Standard.LATEST_RECORD_FORMATS; new RecordFormatPropertyConfigurator( recordFormats, config ).configure(); assertEquals( "Should keep used specified value", 36, config.get( string_block_size ).intValue() ); }
@Test public void overrideDefaultValuesForCurrentFormat() { Config config = Config.defaults(); int testHeaderSize = 17; ResizableRecordFormats recordFormats = new ResizableRecordFormats( testHeaderSize ); new RecordFormatPropertyConfigurator( recordFormats, config ).configure(); assertEquals( DEFAULT_BLOCK_SIZE - testHeaderSize, config.get( string_block_size ).intValue() ); assertEquals( DEFAULT_BLOCK_SIZE - testHeaderSize, config.get( array_block_size ).intValue() ); assertEquals( DEFAULT_LABEL_BLOCK_SIZE - testHeaderSize, config.get( label_block_size ).intValue() ); }
@Test public void checkForMinimumBlockSize() { Config config = Config.defaults(); int testHeaderSize = 60; ResizableRecordFormats recordFormats = new ResizableRecordFormats( testHeaderSize ); expectedException.expect( IllegalArgumentException.class ); expectedException.expectMessage( "Block size should be bigger then " + MINIMAL_BLOCK_SIZE ); new RecordFormatPropertyConfigurator( recordFormats, config ).configure(); }