@Test
  public void shouldUpdateKey() {
    dbTester.prepareDbUnit(getClass(), "shared.xml");

    dao.updateKey(2, "struts:core");

    dbTester.assertDbUnit(getClass(), "shouldUpdateKey-result.xml", "projects");
  }
  @Test
  public void shouldNotUpdateKey() {
    dbTester.prepareDbUnit(getClass(), "shared.xml");

    thrown.expect(IllegalStateException.class);
    thrown.expectMessage(
        "Impossible to update key: a resource with \"org.struts:struts-ui\" key already exists.");

    dao.updateKey(2, "org.struts:struts-ui");
  }