MaxFragmentLengthExtension extends HelloExtension { public Length getFragmentLength() { return fragmentLength; } MaxFragmentLengthExtension(int fragmentLengthCode);  MaxFragmentLengthExtension(Length fragmentLength); Length getFragmentLength(); @Override int getLength(); @Override String toString(); static final int CODE_BITS; }
@Test public void testFromByteArray() throws HandshakeException { byte code = (byte) 0x01; givenAMaxFragmentLengthStruct(code); whenParsingTheExtensionStruct(); assertThat(extension.getFragmentLength().length(), is(512)); }