### Question:
RealOutsideWorld implements OutsideWorld { @Override public void close() throws IOException { fileSystemAbstraction.close(); } RealOutsideWorld();  RealOutsideWorld( PrintStream out, PrintStream err, InputStream inStream ); @Override void stdOutLine( String text ); @Override void stdErrLine( String text ); @Override String readLine(); @Override String promptLine( String fmt, Object... args ); @Override char[] promptPassword( String fmt, Object... args ); @Override void exit( int status ); @Override void printStacktrace( Exception exception ); @Override FileSystemAbstraction fileSystem(); @Override PrintStream errorStream(); @Override void close(); @Override PrintStream outStream(); @Override InputStream inStream();  }### Answer:
@Test public void closeFileSystemOnClose() throws Exception { RealOutsideWorld outsideWorld = new RealOutsideWorld(); FileSystemAbstraction fileSystemMock = mock( FileSystemAbstraction.class ); outsideWorld.fileSystemAbstraction = fileSystemMock; outsideWorld.close(); verify( fileSystemMock ).close(); }