public void writeUshort(int value) throws IOException {
        if (value < 0 || value > 0xFFFF) {
            throw new ExceptionWithContext("Unsigned short value out of range: %d", value);
        }
        write(value);
        write(value >> 8);
    }
@Test(expected=ExceptionWithContext.class)
    public void testWriteUshortOutOfBounds2() throws IOException {
        writer.writeUshort(0x10000);
    }