@Test
public void testHasPendingChanges() throws RepositoryException {

    boolean result = true;
    expect(session.hasPendingChanges()).andReturn(result);
    replay(session);
    replay(sessionFactory);
    assertEquals(jcrTemplate.hasPendingChanges(), result);
}