### Question:
DataSourceWrapper implements DataSource { public String getUrl() { return dbUrl; } DataSourceWrapper(DbProperties dbProperties); @Override Connection getConnection(String username, String password); @Override T unwrap(Class<T> iface); @Override boolean isWrapperFor(Class<?> iface); @Override PrintWriter getLogWriter(); @Override void setLogWriter(PrintWriter out); @Override int getLoginTimeout(); @Override void setLoginTimeout(int seconds); @Override java.util.logging.Logger getParentLogger(); HikariPoolMXBean getJmxBean(); Jdbi initWithJdbi(DbVersion dbVersion); void init(DbVersion dbVersion); void update(DbVersion dbVersion); void shutdown(); boolean isShutdown(); void analyzeTables(); @Override Connection getConnection(); String getUrl(); @Override String toString();  }### Answer:
@Test void shouldConstructDataSourceWrapper() { final String dbType = "h2"; final String dbFileName = "2f2b61"; final String dbDir = "/usr/db"; final String user = "usr"; final String pass = "pass"; final String dbParams = "AUTO_SERVER=TRUE;TRACE_LEVEL_FILE=1"; final DbProperties dbProperties = new DbProperties() .dbPassword(pass) .dbUsername(user) .dbDir(dbDir) .dbFileName(dbFileName) .dbParams(dbParams) .dbType(dbType); final DataSourceWrapper dataSourceWrapperActual = new DataSourceWrapper(dbProperties); assertNotNull(dataSourceWrapperActual); final String urlActual = dataSourceWrapperActual.getUrl(); assertNotNull(urlActual); assertEquals( String.format( "jdbc:%s:file:%s/%s;%s", dbType, dbDir, dbFileName, dbParams + ";MV_STORE=TRUE;CACHE_SIZE=" ), urlActual.substring(0, urlActual.lastIndexOf("=") + 1) ); }