@Test
public void testReadDouble()
{
byte[] barr = DoubleSerializer.INSTANCE.serialize(0d);
assertEquals(0d, DoubleSerializer.INSTANCE.readDouble(new ByteArrayInputStream(barr)).doubleValue(), 0.00000001d);
assertEquals(0d, DoubleSerializer.INSTANCE.readDouble(new ByteArrayRandomAccess(barr)).doubleValue(), 0.00000001d);
barr = DoubleSerializer.INSTANCE.serialize(1d);
assertEquals(1d, DoubleSerializer.INSTANCE.readDouble(new ByteArrayInputStream(barr)).doubleValue(), 0.00000001d);
assertEquals(1d, DoubleSerializer.INSTANCE.readDouble(new ByteArrayRandomAccess(barr)).doubleValue(), 0.00000001d);
barr = DoubleSerializer.INSTANCE.serialize(-1.2034d);
assertEquals(-1.2034d, DoubleSerializer.INSTANCE.readDouble(new ByteArrayInputStream(barr)).doubleValue(), 0.00000001d);
assertEquals(-1.2034d, DoubleSerializer.INSTANCE.readDouble(new ByteArrayRandomAccess(barr)).doubleValue(), 0.00000001d);
barr = DoubleSerializer.INSTANCE.serialize(Double.MAX_VALUE);
assertEquals(Double.MAX_VALUE, DoubleSerializer.INSTANCE.readDouble(new ByteArrayInputStream(barr)).doubleValue(), 0.00000001d);
assertEquals(Double.MAX_VALUE, DoubleSerializer.INSTANCE.readDouble(new ByteArrayRandomAccess(barr)).doubleValue(), 0.00000001d);
barr = DoubleSerializer.INSTANCE.serialize(Double.MIN_VALUE);
assertEquals(Double.MIN_VALUE, DoubleSerializer.INSTANCE.readDouble(new ByteArrayInputStream(barr)).doubleValue(), 0.00000001d);
assertEquals(Double.MIN_VALUE, DoubleSerializer.INSTANCE.readDouble(new ByteArrayRandomAccess(barr)).doubleValue(), 0.00000001d);
}