@Test
public void shouldDecodeMultipleBytes() throws DecodingException {

    VariableLengthByteArrayCodec codec = new VariableLengthByteArrayCodec();
    when(buffer.readAsByte(8)).thenReturn((byte) 0xff).thenReturn((byte) 0x0f);
    byte[] decoded = codec.decode(buffer, resolver, builder);
    assertThat(decoded, is(not(nullValue())));
    assertThat(decoded.length, is(2));
    verify(buffer, times(2)).readAsByte(8);
    verifyNoMoreInteractions(buffer, resolver, builder);
}