### Question:
CGT { public void close() { try { is.close(); } catch (Throwable t) { } is = null; eofReached = true; } CGT(); Entry retrieveEntry(); boolean atEOF(); void close(); boolean isRecordComplete(); int getEntryCount(); int getEntriesRead(); String getHeader(); boolean getNextRecord(); void open(File file); void open(InputStream input); boolean retrieveBoolean(); int retrieveByte(); int retrieveInteger(); String retrieveString(); static final int RECORD_CONTENT_MULTI; }### Answer:
@Test public void testClose() throws Exception { CGT cgt = new CGT(); assertTrue(cgt.atEOF()); cgt.close(); assertTrue(cgt.atEOF()); cgt.close(); assertTrue(cgt.atEOF()); cgt.open(new ByteArrayInputStream(toByteArray(HEADER))); assertFalse("should be ready to read", cgt.atEOF()); cgt.close(); assertTrue(cgt.atEOF()); }