### Question:
CloudStreamSource extends RandomAccessStream { @Override public void close() { if (inputStream != null) { try { inputStream.close(); } catch (IOException e) { e.printStackTrace(); } } } CloudStreamSource(String fileName, long length, InputStream inputStream); void open(); @Override int read(); @Override int read(byte[] bytes, int start, int offs); @Override void close(); String getName(); @Override void moveTo(long position);  }### Answer:
@Test public void close() { cs.close(); int n = -1; try { byte[] buff = new byte[1]; n = cs.read(buff); } catch (IOException ignored) { } assertEquals(-1, n); }