/**
   * Tests accuracy of <code>PersistenceException(String, ExceptionData)</code> constructor.<br>
   * The detail error message and the exception data should be properly set.
   */
  @Test
  public void testCtor3() {
    PersistenceException exception = new PersistenceException(DETAIL_MESSAGE, EXCEPTION_DATA);

    // Verify that there is a detail message
    assertNotNull("Should have message.", exception.getMessage());
    assertEquals(
        "Detailed error message with cause should be properly set.",
        DETAIL_MESSAGE,
        exception.getMessage());

    // Verify that the exception data is correctly set.
    assertNotNull("Application code should not null.", exception.getApplicationCode());
    assertEquals("Exception data is not set.", APPLICATION_CODE, exception.getApplicationCode());
  }