@Test public void testEquals() { assertEquals(factory.hashCode(), repository.hashCode() + 17 * 37); assertFalse(factory.equals(null)); assertEquals(factory, factory); Repository repo2 = createNiceMock(Repository.class); replay(repo2, repository); JcrSessionFactory fact2 = new JcrSessionFactory(); fact2.setRepository(repo2); assertFalse(factory.equals(fact2)); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj instanceof JcrSessionFactory) return (this.hashCode() == obj.hashCode()); return false; }
JcrSessionFactory implements InitializingBean, DisposableBean, SessionFactory { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj instanceof JcrSessionFactory) return (this.hashCode() == obj.hashCode()); return false; } }
JcrSessionFactory implements InitializingBean, DisposableBean, SessionFactory { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj instanceof JcrSessionFactory) return (this.hashCode() == obj.hashCode()); return false; } JcrSessionFactory(Repository repository, String workspaceName, Credentials credentials);  JcrSessionFactory(Repository repository, String workspaceName, Credentials credentials, SessionHolderProviderManager sessionHolderProviderManager);  JcrSessionFactory(); }
JcrSessionFactory implements InitializingBean, DisposableBean, SessionFactory { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj instanceof JcrSessionFactory) return (this.hashCode() == obj.hashCode()); return false; } JcrSessionFactory(Repository repository, String workspaceName, Credentials credentials);  JcrSessionFactory(Repository repository, String workspaceName, Credentials credentials, SessionHolderProviderManager sessionHolderProviderManager);  JcrSessionFactory(); @Override void afterPropertiesSet(); @Override void destroy(); @Override Session getSession(); @Override SessionHolder getSessionHolder(Session session); Repository getRepository(); void setRepository(Repository repository); void setWorkspaceName(String workspaceName); void setCredentials(Credentials credentials); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); EventListenerDefinition[] getEventListeners(); void setEventListeners(EventListenerDefinition[] eventListenerDefinitions); Properties getNamespaces(); void setNamespaces(Properties namespaces); SessionHolderProviderManager getSessionHolderProviderManager(); void setSessionHolderProviderManager(SessionHolderProviderManager sessionHolderProviderManager); void setKeepNewNamespaces(boolean keepNamespaces); void setForceNamespacesRegistration(boolean forceNamespacesRegistration); void setSkipExistingNamespaces(boolean skipRegisteredNamespace); boolean isForceNamespacesRegistration(); boolean isKeepNewNamespaces(); boolean isSkipExistingNamespaces(); Credentials getCredentials(); String getWorkspaceName(); }
JcrSessionFactory implements InitializingBean, DisposableBean, SessionFactory { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj instanceof JcrSessionFactory) return (this.hashCode() == obj.hashCode()); return false; } JcrSessionFactory(Repository repository, String workspaceName, Credentials credentials);  JcrSessionFactory(Repository repository, String workspaceName, Credentials credentials, SessionHolderProviderManager sessionHolderProviderManager);  JcrSessionFactory(); @Override void afterPropertiesSet(); @Override void destroy(); @Override Session getSession(); @Override SessionHolder getSessionHolder(Session session); Repository getRepository(); void setRepository(Repository repository); void setWorkspaceName(String workspaceName); void setCredentials(Credentials credentials); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); EventListenerDefinition[] getEventListeners(); void setEventListeners(EventListenerDefinition[] eventListenerDefinitions); Properties getNamespaces(); void setNamespaces(Properties namespaces); SessionHolderProviderManager getSessionHolderProviderManager(); void setSessionHolderProviderManager(SessionHolderProviderManager sessionHolderProviderManager); void setKeepNewNamespaces(boolean keepNamespaces); void setForceNamespacesRegistration(boolean forceNamespacesRegistration); void setSkipExistingNamespaces(boolean skipRegisteredNamespace); boolean isForceNamespacesRegistration(); boolean isKeepNewNamespaces(); boolean isSkipExistingNamespaces(); Credentials getCredentials(); String getWorkspaceName();  }