### Question:
InfluxLineProtocolRecordReader implements RecordReader { @Override public void close() throws IOException { IOUtils.closeQuietly(reader); } InfluxLineProtocolRecordReader(@Nullable final InputStream in,
                                          @NonNull final Charset charset); @Override Record nextRecord(final boolean coerceTypes, final boolean dropUnknownFields); @Override RecordSchema getSchema(); @Override void close();  }### Answer:
@Test public void closeInputStream() throws SchemaNotFoundException, MalformedRecordException, IOException { InputStream spiedInputStream = Mockito.spy(toInputData()); RecordReader recordReader = readerFactory.createRecordReader(variables, spiedInputStream, -1, logger); recordReader.close(); Mockito.verify(spiedInputStream, Mockito.times(1)).close(); }