@Test public void testHashCode() { prepareUsernamePasswordSession(); final CachedConnection connection = new CachedConnection(USERNAME, PASSWORD, SERVER_ADDRESS, librarian); assertThat(new CachedConnection(USERNAME, PASSWORD, SERVER_ADDRESS, librarian).hashCode()) .isEqualTo(connection.hashCode()); }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((session == null) ? 0 : session.hashCode()); return result; }
CachedConnection implements Connection { @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((session == null) ? 0 : session.hashCode()); return result; } }
CachedConnection implements Connection { @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((session == null) ? 0 : session.hashCode()); return result; } 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); }
CachedConnection implements Connection { @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((session == null) ? 0 : session.hashCode()); return result; } 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(); }
CachedConnection implements Connection { @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((session == null) ? 0 : session.hashCode()); return result; } 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();  }