@Test
  public void testUpdateWithException() {
    String dn = "cn=Some Person,ou=company1,ou=Sweden";
    try {
      dummyDao.updateWithException(dn, "Some Person", "Updated Person", "Updated description");
      fail("DummyException expected");
    } catch (DummyException expected) {
      assertTrue(true);
    }

    log.debug("Verifying result");

    Object ldapResult =
        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(ldapResult);
  }