HI Raffaello, The implementation test looks right. In the test, you might consider using try-with-resources.
Thanks, Brian > On Jul 29, 2020, at 10:44 AM, Raffaello Giulietti > <raffaello.giulie...@gmail.com> wrote: > > + FileInputStream in = new FileInputStream(file); > + DataInputStream dis = new DataInputStream(in); > + > + boolean caughtException = false; > + try { > + dis.readFully(buffer, -1, buffer.length); > + } catch (IndexOutOfBoundsException ie) { > + caughtException = true; > + } finally { > + dis.close(); > + if (!caughtException) > + throw new RuntimeException("Test testNegativeOffset() > failed"); > + }