### Question:
IMemoryImageInputStream extends ImageInputStreamImpl { @Override public void seek(long pos) throws IOException { address = pos; } IMemoryImageInputStream(IMemory memory, long startingAddress); @Override int read(byte[] buffer, int offset, int length); @Override int read(); @Override long getStreamPosition(); @Override void seek(long pos);  }### Answer:
@Test public void testSeek() throws Exception { AbstractMemory memory = new MockMemory(ByteOrder.BIG_ENDIAN); memory.addMemorySource(new MockMemorySource(new byte[] { (byte)0xA0}, 0, 0x10000, 0x10000)); memory.addMemorySource(new MockMemorySource(new byte[] { (byte)0xB0}, 0, 0x20000, 0x10000)); IMemoryImageInputStream sut = new IMemoryImageInputStream(memory, 0x10000); assertEquals(0x10000,sut.getStreamPosition()); assertEquals(0xA0,sut.read()); sut.seek(0x20000); assertEquals(0x20000,sut.getStreamPosition()); assertEquals(0xB0,sut.read()); }