/**
   * testAllocateConnectionWrongMCF.
   *
   * @throws ResourceException for exception
   */
  @Test(expected = ResourceException.class)
  public void testAllocateConnectionWrongMCF() throws ResourceException {
    AbstractConnectionManager connectionManager = new MockConnectionManager();

    PoolConfiguration pc = new PoolConfiguration();
    PoolFactory pf = new PoolFactory();

    Pool pool =
        pf.create(PoolStrategy.ONE_POOL, new MockManagedConnectionFactory(), pc, false, true);
    pool.setConnectionListenerFactory(connectionManager);

    connectionManager.setPool(pool);
    connectionManager.allocateConnection(new MockManagedConnectionFactory(), null);
  }
 /**
  * testAllocateConnectionPoolNull.
  *
  * @throws ResourceException for exception
  */
 @Test(expected = ResourceException.class)
 public void testAllocateConnectionPoolNull() throws ResourceException {
   AbstractConnectionManager connectionManager = new MockConnectionManager();
   connectionManager.setPool(null);
   connectionManager.allocateConnection(null, null);
 }