test_class.declarator: mockPool
test_class.modifier: private static
test_class.original_string: private static BoneCP mockPool;
test_class.type: BoneCP
test_class.var_name: mockPool
test_class.declarator: mockConnection
test_class.modifier: private static
test_class.original_string: private static ConnectionHandle mockConnection;
test_class.type: ConnectionHandle
test_class.var_name: mockConnection
test_class.declarator: mockProperties
test_class.modifier: private static
test_class.original_string: private static Properties mockProperties;
test_class.type: Properties
test_class.var_name: mockProperties
test_class.declarator: testClass
test_class.modifier: private static
test_class.original_string: private static BoneCPConnectionProvider testClass;
test_class.type: BoneCPConnectionProvider
test_class.var_name: testClass
test_class.declarator: URL = "jdbc:mock"
test_class.modifier: private static
test_class.original_string: private static String URL = "jdbc:mock";
test_class.type: String
test_class.var_name: URL
test_class.declarator: USERNAME = "sa"
test_class.modifier: private static
test_class.original_string: private static String USERNAME = "sa";
test_class.type: String
test_class.var_name: USERNAME
test_class.declarator: PASSWORD = ""
test_class.modifier: private static
test_class.original_string: private static String PASSWORD = "";
test_class.type: String
test_class.var_name: PASSWORD
test_class.declarator: DRIVER = "com.jolbox.bonecp.MockJDBCDriver"
test_class.modifier: private static
test_class.original_string: private static String DRIVER = "com.jolbox.bonecp.MockJDBCDriver";
test_class.type: String
test_class.var_name: DRIVER
test_class.declarator: TEST_QUERY = "SELECT 1 FROM INFORMATION_SCHEMA.SYSTEM_USERS"
test_class.modifier: public static final
test_class.original_string: public static final String TEST_QUERY = "SELECT 1 FROM INFORMATION_SCHEMA.SYSTEM_USERS";
test_class.type: String
test_class.var_name: TEST_QUERY
test_class.declarator: driver
test_class.modifier: private
test_class.original_string: private MockJDBCDriver driver;
test_class.type: MockJDBCDriver
test_class.var_name: driver
test_class.file: bonecp-hbnprovider/src/test/java/com/jolbox/bonecp/provider/TestBoneCPConnectionProvider.java
test_class.identifier: TestBoneCPConnectionProvider
test_case.body: @Test
  	public void testCreatePool() throws SQLException, ClassNotFoundException, CloneNotSupportedException {
  	
  		BoneCPConfig mockConfig = createNiceMock(BoneCPConfig.class);
  		expect(mockConfig.getPartitionCount()).andReturn(1).anyTimes();
  		expect(mockConfig.getMaxConnectionsPerPartition()).andReturn(1).anyTimes();
  		expect(mockConfig.getMinConnectionsPerPartition()).andReturn(1).anyTimes();
  		expect(mockConfig.getIdleConnectionTestPeriodInMinutes()).andReturn(100L).anyTimes();
  		expect(mockConfig.getUsername()).andReturn("somethingbad").anyTimes();
  		expect(mockConfig.getPassword()).andReturn("somethingbad").anyTimes();
  		expect(mockConfig.getJdbcUrl()).andReturn("invalid").anyTimes();
  //		expect(mockConfig.getReleaseHelperThreads()).andReturn(1).once().andReturn(0).anyTimes();
  		replay(mockConfig);
  		try{
  			testClass.createPool(mockConfig);
  			fail("Should throw an exception");
  		} catch (RuntimeException e){
  			// do nothing
  		}
  		verify(mockConfig);
  		
  		reset(mockConfig);
  		
  		Class.forName(DRIVER);
  		mockConfig = createNiceMock(BoneCPConfig.class);
  		expect(mockConfig.getPartitionCount()).andReturn(1).anyTimes();
  		expect(mockConfig.getMaxConnectionsPerPartition()).andReturn(1).anyTimes();
  		expect(mockConfig.getMinConnectionsPerPartition()).andReturn(1).anyTimes();
  		expect(mockConfig.getIdleConnectionTestPeriodInMinutes()).andReturn(100L).anyTimes();
  		expect(mockConfig.getUsername()).andReturn(USERNAME).anyTimes();
  		expect(mockConfig.getPassword()).andReturn(PASSWORD).anyTimes();
  		expect(mockConfig.getJdbcUrl()).andReturn(URL).anyTimes();
  		expect(mockConfig.isLazyInit()).andReturn(false).anyTimes();
  		expect(mockConfig.clone()).andReturn(mockConfig).anyTimes();
  		 
  		replay(mockConfig);
  		
  		try{
  			testClass.createPool(mockConfig);
  		} catch (RuntimeException e){
  			fail("Should pass: ");
  		}
  		verify(mockConfig);
  		
  		
  	}
test_case.class_method_signature: TestBoneCPConnectionProvider.testCreatePool()
test_case.full_signature: @Test public void testCreatePool()
test_case.identifier: testCreatePool
test_case.invocations: createNiceMock anyTimes andReturn expect getPartitionCount anyTimes andReturn expect getMaxConnectionsPerPartition anyTimes andReturn expect getMinConnectionsPerPartition anyTimes andReturn expect getIdleConnectionTestPeriodInMinutes anyTimes andReturn expect getUsername anyTimes andReturn expect getPassword anyTimes andReturn expect getJdbcUrl replay createPool fail verify reset forName createNiceMock anyTimes andReturn expect getPartitionCount anyTimes andReturn expect getMaxConnectionsPerPartition anyTimes andReturn expect getMinConnectionsPerPartition anyTimes andReturn expect getIdleConnectionTestPeriodInMinutes anyTimes andReturn expect getUsername anyTimes andReturn expect getPassword anyTimes andReturn expect getJdbcUrl anyTimes andReturn expect isLazyInit anyTimes andReturn expect clone replay createPool fail verify
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCreatePool()
focal_class.declarator: serialVersionUID = -5236029951415598543L
focal_class.modifier: private static final
focal_class.original_string: private static final long serialVersionUID = -5236029951415598543L;
focal_class.type: long
focal_class.var_name: serialVersionUID
focal_class.declarator: CONFIG_CONNECTION_DRIVER_CLASS = "hibernate.connection.driver_class"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String CONFIG_CONNECTION_DRIVER_CLASS = "hibernate.connection.driver_class";
focal_class.type: String
focal_class.var_name: CONFIG_CONNECTION_DRIVER_CLASS
focal_class.declarator: CONFIG_CONNECTION_PASSWORD = "hibernate.connection.password"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String CONFIG_CONNECTION_PASSWORD = "hibernate.connection.password";
focal_class.type: String
focal_class.var_name: CONFIG_CONNECTION_PASSWORD
focal_class.declarator: CONFIG_CONNECTION_USERNAME = "hibernate.connection.username"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String CONFIG_CONNECTION_USERNAME = "hibernate.connection.username";
focal_class.type: String
focal_class.var_name: CONFIG_CONNECTION_USERNAME
focal_class.declarator: CONFIG_CONNECTION_URL = "hibernate.connection.url"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String CONFIG_CONNECTION_URL = "hibernate.connection.url";
focal_class.type: String
focal_class.var_name: CONFIG_CONNECTION_URL
focal_class.declarator: CONFIG_CONNECTION_DRIVER_CLASS_ALTERNATE = "javax.persistence.jdbc.driver"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String CONFIG_CONNECTION_DRIVER_CLASS_ALTERNATE = "javax.persistence.jdbc.driver";
focal_class.type: String
focal_class.var_name: CONFIG_CONNECTION_DRIVER_CLASS_ALTERNATE
focal_class.declarator: CONFIG_CONNECTION_PASSWORD_ALTERNATE = "javax.persistence.jdbc.password"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String CONFIG_CONNECTION_PASSWORD_ALTERNATE = "javax.persistence.jdbc.password";
focal_class.type: String
focal_class.var_name: CONFIG_CONNECTION_PASSWORD_ALTERNATE
focal_class.declarator: CONFIG_CONNECTION_USERNAME_ALTERNATE = "javax.persistence.jdbc.user"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String CONFIG_CONNECTION_USERNAME_ALTERNATE = "javax.persistence.jdbc.user";
focal_class.type: String
focal_class.var_name: CONFIG_CONNECTION_USERNAME_ALTERNATE
focal_class.declarator: CONFIG_CONNECTION_URL_ALTERNATE = "javax.persistence.jdbc.url"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String CONFIG_CONNECTION_URL_ALTERNATE = "javax.persistence.jdbc.url";
focal_class.type: String
focal_class.var_name: CONFIG_CONNECTION_URL_ALTERNATE
focal_class.declarator: pool
focal_class.modifier: private
focal_class.original_string: private BoneCP pool;
focal_class.type: BoneCP
focal_class.var_name: pool
focal_class.declarator: isolation
focal_class.modifier: private
focal_class.original_string: private Integer isolation;
focal_class.type: Integer
focal_class.var_name: isolation
focal_class.declarator: autocommit
focal_class.modifier: private
focal_class.original_string: private boolean autocommit;
focal_class.type: boolean
focal_class.var_name: autocommit
focal_class.declarator: classLoader
focal_class.modifier: private
focal_class.original_string: private ClassLoader classLoader;
focal_class.type: ClassLoader
focal_class.var_name: classLoader
focal_class.declarator: config
focal_class.modifier: private
focal_class.original_string: private BoneCPConfig config;
focal_class.type: BoneCPConfig
focal_class.var_name: config
focal_class.declarator: logger = LoggerFactory.getLogger(BoneCPConnectionProvider.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = LoggerFactory.getLogger(BoneCPConnectionProvider.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.file: bonecp-hbnprovider/src/main/java/com/jolbox/bonecp/provider/BoneCPConnectionProvider.java
focal_class.identifier: BoneCPConnectionProvider
focal_class.interfaces: implements ConnectionProvider,Configurable,Stoppable
focal_class.class_method_signature: BoneCPConnectionProvider.closeConnection(Connection conn)
focal_class.full_signature: public void closeConnection(Connection conn)
focal_class.identifier: closeConnection
focal_class.modifiers: public
focal_class.parameters: (Connection conn)
focal_class.return: void
focal_class.signature: void closeConnection(Connection conn)
focal_class.class_method_signature: BoneCPConnectionProvider.configure(Properties props)
focal_class.full_signature: public void configure(Properties props)
focal_class.identifier: configure
focal_class.modifiers: public
focal_class.parameters: (Properties props)
focal_class.return: void
focal_class.signature: void configure(Properties props)
focal_class.class_method_signature: BoneCPConnectionProvider.loadClass(String clazz)
focal_class.full_signature: protected Class<?> loadClass(String clazz)
focal_class.identifier: loadClass
focal_class.modifiers: protected
focal_class.parameters: (String clazz)
focal_class.return: Class<?>
focal_class.signature: Class<?> loadClass(String clazz)
focal_class.class_method_signature: BoneCPConnectionProvider.createPool(BoneCPConfig config)
focal_class.full_signature: protected BoneCP createPool(BoneCPConfig config)
focal_class.identifier: createPool
focal_class.modifiers: protected
focal_class.parameters: (BoneCPConfig config)
focal_class.return: BoneCP
focal_class.signature: BoneCP createPool(BoneCPConfig config)
focal_class.class_method_signature: BoneCPConnectionProvider.getConnection()
focal_class.full_signature: public Connection getConnection()
focal_class.identifier: getConnection
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Connection
focal_class.signature: Connection getConnection()
focal_class.class_method_signature: BoneCPConnectionProvider.supportsAggressiveRelease()
focal_class.full_signature: public boolean supportsAggressiveRelease()
focal_class.identifier: supportsAggressiveRelease
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean supportsAggressiveRelease()
focal_class.class_method_signature: BoneCPConnectionProvider.getConfig()
focal_class.full_signature: protected BoneCPConfig getConfig()
focal_class.identifier: getConfig
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: BoneCPConfig
focal_class.signature: BoneCPConfig getConfig()
focal_class.class_method_signature: BoneCPConnectionProvider.getClassLoader()
focal_class.full_signature: public ClassLoader getClassLoader()
focal_class.identifier: getClassLoader
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: ClassLoader
focal_class.signature: ClassLoader getClassLoader()
focal_class.class_method_signature: BoneCPConnectionProvider.setClassLoader(ClassLoader classLoader)
focal_class.full_signature: public void setClassLoader(ClassLoader classLoader)
focal_class.identifier: setClassLoader
focal_class.modifiers: public
focal_class.parameters: (ClassLoader classLoader)
focal_class.return: void
focal_class.signature: void setClassLoader(ClassLoader classLoader)
focal_class.class_method_signature: BoneCPConnectionProvider.isUnwrappableAs(Class unwrapType)
focal_class.full_signature: @Override @SuppressWarnings("rawtypes") public boolean isUnwrappableAs(Class unwrapType)
focal_class.identifier: isUnwrappableAs
focal_class.modifiers: @Override @SuppressWarnings("rawtypes") public
focal_class.parameters: (Class unwrapType)
focal_class.return: boolean
focal_class.signature: boolean isUnwrappableAs(Class unwrapType)
focal_class.class_method_signature: BoneCPConnectionProvider.unwrap(Class<T> unwrapType)
focal_class.full_signature: @SuppressWarnings("unchecked") @Override public T unwrap(Class<T> unwrapType)
focal_class.identifier: unwrap
focal_class.modifiers: @SuppressWarnings("unchecked") @Override public
focal_class.parameters: (Class<T> unwrapType)
focal_class.return: T
focal_class.signature: T unwrap(Class<T> unwrapType)
focal_class.class_method_signature: BoneCPConnectionProvider.mapToProperties(Map<String, String> map)
focal_class.full_signature: private Properties mapToProperties(Map<String, String> map)
focal_class.identifier: mapToProperties
focal_class.modifiers: private
focal_class.parameters: (Map<String, String> map)
focal_class.return: Properties
focal_class.signature: Properties mapToProperties(Map<String, String> map)
focal_class.class_method_signature: BoneCPConnectionProvider.configure(Map configurationValues)
focal_class.full_signature: @SuppressWarnings({ "unchecked", "rawtypes" }) @Override public void configure(Map configurationValues)
focal_class.identifier: configure
focal_class.modifiers: @SuppressWarnings({ "unchecked", "rawtypes" }) @Override public
focal_class.parameters: (Map configurationValues)
focal_class.return: void
focal_class.signature: void configure(Map configurationValues)
focal_class.class_method_signature: BoneCPConnectionProvider.stop()
focal_class.full_signature: @Override public void stop()
focal_class.identifier: stop
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void stop()
focal_class.class_method_signature: BoneCPConnectionProvider.close()
focal_class.full_signature: public void close()
focal_class.identifier: close
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_method.body: protected BoneCP createPool(BoneCPConfig config) {
  		try{
  			return new BoneCP(config);
  		}  catch (SQLException e) {
  			throw new HibernateException(e);
  		}
  	}
focal_method.class_method_signature: BoneCPConnectionProvider.createPool(BoneCPConfig config)
focal_method.full_signature: protected BoneCP createPool(BoneCPConfig config)
focal_method.identifier: createPool
focal_method.modifiers: protected
focal_method.parameters: (BoneCPConfig config)
focal_method.return: BoneCP
focal_method.signature: BoneCP createPool(BoneCPConfig config)