@Test
public void shouldEncodeCorrectly() throws IOException {

    NumericCodec codec = new NumericCodec(size, ByteOrder.BigEndian, NumericCodec.NumericType.Long, matchExpression);
    when(size.eval(resolver)).thenReturn(3);
    codec.encode(new Long(12L), channel, resolver);
    Mockito.verify(channel).write(3, 12L, ByteOrder.BigEndian);
}