@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));
}