Here you can find the source of getDerbyUnitConnection()
public static Connection getDerbyUnitConnection() throws SQLException
//package com.java2s; //License from project: Apache License import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import java.util.Properties; public class Main { public static Connection getDerbyUnitConnection() throws SQLException { String url = "jdbc:derby:memory:flexims;create=true"; Properties props = new Properties(); props.setProperty("user", "flexims"); props.setProperty("password", "123456"); return DriverManager.getConnection(url, props); }//from w w w .ja v a 2 s. c om public static Connection getConnection() throws SQLException { return getDerbyUnitConnection(); } }