### Question:
NusicDatabaseSqlite extends SQLiteOpenHelper { static String createTable(String tableName, String... columnsAndTypeTuples) { StringBuffer sql = new StringBuffer(DATABASE_TABLE_CREATE).append( tableName).append("("); int index = 0; sql.append(columnsAndTypeTuples[index++]).append(" ") .append(columnsAndTypeTuples[index++]); while (index < columnsAndTypeTuples.length) { sql.append(", "); sql.append(columnsAndTypeTuples[index++]).append(" ") .append(columnsAndTypeTuples[index++]); } sql.append(");"); return sql.toString(); } NusicDatabaseSqlite(); @Override synchronized void close(); @Override void onCreate(SQLiteDatabase db); @Override void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion);  }### Answer:
@Test public void testCreateTable() { String expected = "CREATE TABLE testdb(id INTEGER PRIMARY KEY AUTOINCREMENT, someText TEXT NOT NULL);"; String actual = NusicDatabaseSqlite.createTable("testdb", "id", "INTEGER PRIMARY KEY AUTOINCREMENT", "someText", "TEXT NOT NULL"); assertEquals("Unexpected sql query returned", expected, actual); }