### Question:
ExtraDataMaxLengthValidationRule implements DetachedBlockHeaderValidationRule { @Override public boolean validate(final BlockHeader header, final BlockHeader parent) { return validateExtraData(header.getExtraData()); } ExtraDataMaxLengthValidationRule(final long maxExtraDataBytes); @Override boolean validate(final BlockHeader header, final BlockHeader parent);  }### Answer:
@Test public void sufficientlySmallExtraDataBlockValidateSuccessfully() { final ExtraDataMaxLengthValidationRule uut = new ExtraDataMaxLengthValidationRule(1); final BlockHeaderTestFixture builder = new BlockHeaderTestFixture(); builder.extraData(Bytes.wrap(new byte[1])); final BlockHeader header = builder.buildHeader(); assertThat(uut.validate(header, null)).isTrue(); }
@Test public void tooLargeExtraDataCausesValidationFailure() { final ExtraDataMaxLengthValidationRule uut = new ExtraDataMaxLengthValidationRule(1); final BlockHeaderTestFixture builder = new BlockHeaderTestFixture(); builder.extraData(Bytes.wrap(new byte[2])); final BlockHeader header = builder.buildHeader(); assertThat(uut.validate(header, null)).isFalse(); }