### Question:
MmdReader implements Reader { @Override public void close() { delegateReader = null; if (ncFile != null) { try { ncFile.close(); } catch (IOException ignore) { } } else { throw new IllegalStateException("No file opened - has init() not been called?"); } } MmdReader(String sensorName); @Override void open(final DataFile dataFile, File archiveRoot); @Override int getNumRecords(); @Override Observation readObservation(final int recordNo); @Override List<SamplingPoint> readSamplingPoints(); @Override Item getColumn(String role); @Override Item[] getColumns(); @Override DataFile getDatafile(); @Override GeoCoding getGeoCoding(int recordNo); @Override double getDTime(int recordNo, int scanLine); @Override long getTime(int recordNo, int scanLine); @Override final Array read(String role, ExtractDefinition extractDefinition); @Override void close(); @Override int getLineSkip(); @Override InsituSource getInsituSource(); @Override String getDatasetName(); @Override Product getProduct(); @Override int getScanLineCount(); @Override int getElementCount(); int getMatchupId(final int recordNo); void setConfiguration(Configuration configuration);  }### Answer:
@Test(expected = IllegalStateException.class) public void testFailingClose() throws Exception { mmdReader.close(); }