@Test
  public void testModifyAttributesWithException() {
    String dn = "cn=Some Person,ou=company1,ou=Sweden";
    try {
      // Perform test
      dummyDao.modifyAttributesWithException(dn, "Updated lastname", "Updated description");
      fail("DummyException expected");
    } catch (DummyException expected) {
      assertTrue(true);
    }

    // Verify result - check that the operation was properly rolled back
    Object result =
        ldapTemplate.lookup(
            dn,
            new AttributesMapper() {
              public Object mapFromAttributes(Attributes attributes) throws NamingException {
                assertEquals("Person", attributes.get("sn").get());
                assertEquals("Sweden, Company1, Some Person", attributes.get("description").get());
                return new Object();
              }
            });

    assertNotNull(result);
  }