/**
  * Test <code>getIDGenerator()</code>.
  *
  * @throws Exception to JUnit.
  */
 public void testGetIDGenerator() throws Exception {
   assertEquals(
       "getIDGenerator() should be correct.",
       generator,
       TestHelper.invokeMethod(
           AbstractDbPhasePersistence.class,
           persistence,
           "getIDGenerator",
           new Class[] {},
           new Object[] {}));
 }
  /**
   * Test <code>getConnection()</code>.
   *
   * @throws Exception to JUnit.
   */
  public void testGetConnection() throws Exception {
    Connection connection =
        (Connection)
            TestHelper.invokeMethod(
                AbstractDbPhasePersistence.class,
                persistence,
                "getConnection",
                new Class[] {},
                new Object[] {});

    assertEquals("getConnection() should be correct.", "demo", connection.getCatalog());
  }
  /**
   * Test <code>getConnection()</code> when connectionName does not exist in configuration. The
   * connection should be created.
   *
   * @throws Exception to JUnit.
   */
  public void testGetConnectionNoConnectionName() throws Exception {
    persistence =
        new InformixPhasePersistence(TestHelper.PHASE_PERSISTENCE_NAMESPACE + ".NoConnectionName");

    Connection connection =
        (Connection)
            TestHelper.invokeMethod(
                AbstractDbPhasePersistence.class,
                persistence,
                "getConnection",
                new Class[] {},
                new Object[] {});

    assertEquals("getConnection() should be correct.", "demo", connection.getCatalog());
  }