### Question:
ByteArrayWrapper extends ByteArrayInputStream implements PositionedReadable, Seekable, Closeable { public synchronized long getPos() throws IOException { return pos; } ByteArrayWrapper(byte[] buf); synchronized void seek(long position); synchronized long getPos(); boolean seekToNewSource(long targetPos); synchronized int read(long position, byte[] buffer, int offset, int length); synchronized void readFully(long position, byte[] buffer, int offset, int length); synchronized void readFully(long position, byte[] buffer);  }### Answer:
@Test public void testGetPos() throws IOException { ByteArrayWrapper wrapper = createInstance(16); final int length = 4; byte[] buf = new byte[length]; wrapper.read(buf); assertEquals(length, wrapper.getPos()); wrapper.close(); }