### Question:
CachedConnection implements Connection { public void closePhysical() { closed = true; if (session != null) { session.disconnect(); } } CachedConnection(final String username, final String password, final URI serverAddress,
            final ConnectionLibrarian<CachedConnection> librarian);  CachedConnection(final String username, final String salt, final URI privateKeyLocation,
            final URI serverAddress, final ConnectionLibrarian<CachedConnection> librarian); @Override void close(); void closePhysical(); @Override boolean equals(final Object obj); @Override ChannelSftp getSFtp(); @Override ChannelShell getShell(); @Override int hashCode(); @Override boolean isClosed();  }### Answer:
@Test public void testClosePhysical() { prepareUsernamePasswordSession(); final CachedConnection connection = new CachedConnection(USERNAME, PASSWORD, SERVER_ADDRESS, librarian); assertThat(connection.isClosed()).isFalse(); connection.closePhysical(); assertThat(connection.isClosed()).isTrue(); }