expect(buffer.getBitPos()).andReturn(12L).anyTimes();
buffer.setBitPos(16L);
replay(codec, metadata, buffer, resolver, context);
Codec decorated = decorator.decorate(codec, metadata, Test1.class, context);
assertNotSame(decorated, codec);
decorated.decode(buffer, resolver, builder);
verify(codec, metadata, buffer, resolver, context);
}
public void testAligningField() throws DecodingException {
ByteAligningDecorator decorator = new ByteAligningDecorator();