### Question:
BinaryDecoder extends Decoder { @Override public double readDouble() throws IOException { ensureBounds(8); int len = 1; int n1 = (buf[pos] & 0xff) | ((buf[pos + len++] & 0xff) << 8) | ((buf[pos + len++] & 0xff) << 16) | ((buf[pos + len++] & 0xff) << 24); int n2 = (buf[pos + len++] & 0xff) | ((buf[pos + len++] & 0xff) << 8) | ((buf[pos + len++] & 0xff) << 16) | ((buf[pos + len++] & 0xff) << 24); if ((pos + 8) > limit) { throw new EOFException(); } pos += 8; return Double.longBitsToDouble((((long) n1) & 0xffffffffL) | (((long) n2) << 32)); } protected  BinaryDecoder();   BinaryDecoder(InputStream in, int bufferSize);   BinaryDecoder(byte[] data, int offset, int length); @Override void readNull(); @Override boolean readBoolean(); @Override int readInt(); @Override long readLong(); @Override float readFloat(); @Override double readDouble(); @Override Utf8 readString(Utf8 old); @Override String readString(); @Override void skipString(); @Override ByteBuffer readBytes(ByteBuffer old); @Override void skipBytes(); @Override void readFixed(byte[] bytes, int start, int length); @Override void skipFixed(int length); @Override int readEnum(); @Override long readArrayStart(); @Override long arrayNext(); @Override long skipArray(); @Override long readMapStart(); @Override long mapNext(); @Override long skipMap(); @Override int readIndex(); boolean isEnd(); InputStream inputStream();  }### Answer:
@Test(expected = EOFException.class) public void testEOFDouble() throws IOException { newDecoderWithNoData().readDouble(); }