### Question:
MainnetBlockHeaderValidator { public static BlockHeaderValidator.Builder create() { return createValidator(); }  static BlockHeaderValidator.Builder create(); static BlockHeaderValidator.Builder createDaoValidator(); static BlockHeaderValidator.Builder createClassicValidator(); static boolean validateHeaderForDaoFork(final BlockHeader header); static boolean validateHeaderForClassicFork(final BlockHeader header); static final Bytes DAO_EXTRA_DATA; static final int TIMESTAMP_TOLERANCE_S; static final int MINIMUM_SECONDS_SINCE_PARENT; static final Bytes CLASSIC_FORK_BLOCK_HEADER; }### Answer:
@Test public void validHeaderFrontier() throws Exception { final BlockHeaderValidator headerValidator = MainnetBlockHeaderValidator.create() .difficultyCalculator(MainnetDifficultyCalculators.FRONTIER) .build(); assertThat( headerValidator.validateHeader( ValidationTestUtils.readHeader(300006), ValidationTestUtils.readHeader(300005), protocolContext, HeaderValidationMode.FULL)) .isTrue(); }
@Test public void validHeaderHomestead() throws Exception { final BlockHeaderValidator headerValidator = MainnetBlockHeaderValidator.create() .difficultyCalculator(MainnetDifficultyCalculators.HOMESTEAD) .build(); assertThat( headerValidator.validateHeader( ValidationTestUtils.readHeader(1200001), ValidationTestUtils.readHeader(1200000), protocolContext, HeaderValidationMode.FULL)) .isTrue(); }
@Test public void invalidParentHash() throws Exception { final BlockHeaderValidator headerValidator = MainnetBlockHeaderValidator.create() .difficultyCalculator(MainnetDifficultyCalculators.FRONTIER) .build(); assertThat( headerValidator.validateHeader( ValidationTestUtils.readHeader(1200001), ValidationTestUtils.readHeader(4400000), protocolContext, HeaderValidationMode.FULL)) .isFalse(); }
@Test public void validHeaderByzantium() throws Exception { final BlockHeaderValidator headerValidator = MainnetBlockHeaderValidator.create() .difficultyCalculator(MainnetDifficultyCalculators.BYZANTIUM) .build(); assertThat( headerValidator.validateHeader( ValidationTestUtils.readHeader(4400001), ValidationTestUtils.readHeader(4400000), protocolContext, HeaderValidationMode.FULL)) .isTrue(); }