@Test
public void shouldSupportEquals() {

    assertTrue(stmt.equals(stmt));
    JcrStatement stmt2 = null;
    try {
        stmt2 = new JcrStatement(connection);
        assertFalse(stmt.equals(stmt2));
    } finally {
        if (stmt2 != null) {
            stmt2.close();
        }
    }
}