@Test
public void testEncode() throws Exception {

    DoubleCodec codec = new DoubleCodec();
    Assert.assertArrayEquals(
            new byte[] {
                    (byte) 0x40,
                    (byte) 0x28,
                    (byte) 0x98,
                    (byte) 0x92,
                    (byte) 0x25,
                    (byte) 0x31,
                    (byte) 0x11,
                    (byte) 0xf1
            },
            codec.encode(new Double(12.29799d), 8));
}