### Question:
DataSourceFactory { public static DataSource newDataSource(Properties properties) { try { DataSource dataSource = BasicDataSourceFactory.createDataSource(properties); return dataSource; } catch (Exception e) { throw new DataSourceCreationException("Unable to create data source using specified properties " + properties, e); } } private  DataSourceFactory(); synchronized static DataSource getDataSource(String systemPropertyPrefix); static DataSource newDataSource(Properties properties);  }### Answer:
@Test public void returns_a_dataSource() { Properties properties = new Properties(); properties.setProperty("url", JDBC_URL); properties.setProperty("driverClassName", JDBC_DRIVER_CLASS_NAME); DataSource dataSource = DataSourceFactory.newDataSource(properties); assertNotNull(dataSource); }