public void testReEnteringRecovery() throws Exception {
    if (log.isDebugEnabled()) {
      log.debug("*** Starting testReEnteringRecovery");
    }
    pds.startRecovery();
    try {
      pds.startRecovery();
      fail("expected RecoveryException");
    } catch (RecoveryException ex) {
      assertEquals(
          "recovery already in progress on a PoolingDataSource containing an XAPool of resource pds with 1 connection(s) (0 still available)",
          ex.getMessage());
    }

    // make sure startRecovery() can be called again once endRecovery() has been called
    pds.endRecovery();
    pds.startRecovery();
    pds.endRecovery();
  }